diff --git a/app/src/main/res/layout/activity_add_transaksi.xml b/app/src/main/res/layout/activity_add_transaksi.xml index bdf9c6244d52db0d6ac43785de38e70c17ea08b7..c609127d78578b71d585cae6904768f93cac3b4f 100644 --- a/app/src/main/res/layout/activity_add_transaksi.xml +++ b/app/src/main/res/layout/activity_add_transaksi.xml @@ -1,123 +1,129 @@ <?xml version="1.0" encoding="utf-8"?> -<ScrollView +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent"> - <LinearLayout - + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="16dp"> + <ScrollView + android:id="@+id/scrollable" android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical" - android:padding="16dp"> - - <TextView - android:id="@+id/textViewTypeLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Type" - android:layout_marginBottom="8dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" /> - - <RelativeLayout + android:layout_height="wrap_content" + android:paddingBottom="50dp"> + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/spinner_enabled" - android:backgroundTint="@color/brown_1" - android:layout_marginBottom="8dp"> - <Spinner - android:id="@+id/spinnerCategory" + android:orientation="vertical"> + <TextView + android:id="@+id/textViewTypeLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Type" + android:layout_marginBottom="8dp" + android:layout_alignParentTop="true" + android:layout_alignParentStart="true" /> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/spinner_enabled" + android:backgroundTint="@color/brown_1" + android:layout_marginBottom="8dp"> + <Spinner + android:id="@+id/spinnerCategory" + android:layout_width="match_parent" + android:layout_height="wrap_content" + style="@style/Widget.AppCompat.DropDownItem.Spinner" + android:textSize="18sp" + android:paddingVertical="6dp" + android:paddingHorizontal="12dp" + /> + </RelativeLayout> + + + + <TextView + android:id="@+id/textViewTitleLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Title" + android:layout_marginBottom="8dp" + android:layout_alignParentTop="true" + android:layout_alignParentStart="true" /> + + <EditText + android:id="@+id/editTextTitle" android:layout_width="match_parent" android:layout_height="wrap_content" - style="@style/Widget.AppCompat.DropDownItem.Spinner" - android:textSize="18sp" + android:background="@drawable/edittext_enabled" android:paddingVertical="6dp" android:paddingHorizontal="12dp" - /> - </RelativeLayout> - - + android:layout_marginBottom="8dp" + android:hint="Title" /> - <TextView - android:id="@+id/textViewTitleLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Title" - android:layout_marginBottom="8dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" /> + <TextView + android:id="@+id/textViewAmountLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Amount" + android:layout_marginBottom="8dp" + android:layout_alignParentTop="true" + android:layout_alignParentStart="true" /> - <EditText - android:id="@+id/editTextTitle" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/edittext_enabled" - android:paddingVertical="6dp" - android:paddingHorizontal="12dp" - android:layout_marginBottom="8dp" - android:hint="Title" /> - - <TextView - android:id="@+id/textViewAmountLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Amount" - android:layout_marginBottom="8dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" /> + <EditText + android:id="@+id/editTextAmount" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/edittext_enabled" + android:inputType="numberDecimal" + android:paddingVertical="6dp" + android:paddingHorizontal="12dp" + android:layout_marginBottom="8dp" + android:hint="Amount" /> - <EditText - android:id="@+id/editTextAmount" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/edittext_enabled" - android:inputType="numberDecimal" - android:paddingVertical="6dp" - android:paddingHorizontal="12dp" - android:layout_marginBottom="8dp" - android:hint="Amount" /> - - <TextView - android:id="@+id/textViewLocationLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Location" - android:layout_marginBottom="8dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" /> + <TextView + android:id="@+id/textViewLocationLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Location" + android:layout_marginBottom="8dp" + android:layout_alignParentTop="true" + android:layout_alignParentStart="true" /> - <EditText - android:id="@+id/editTextLocation" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/edittext_enabled" - android:paddingVertical="6dp" - android:paddingHorizontal="12dp" - android:layout_marginBottom="8dp" - android:hint="Location" /> + <EditText + android:id="@+id/editTextLocation" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/edittext_enabled" + android:paddingVertical="6dp" + android:paddingHorizontal="12dp" + android:layout_marginBottom="8dp" + android:hint="Location" /> + </LinearLayout> - <Space - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1"/> + </ScrollView> - <Button - android:id="@+id/buttonSubmit" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="Submit" - android:backgroundTint="@color/green" - android:textColor="@color/white" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintBottom_toBottomOf="parent" /> + <Space + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"/> - </LinearLayout> -</ScrollView> + <Button + android:id="@+id/buttonSubmit" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Submit" + android:backgroundTint="@color/green" + android:textColor="@color/white" + android:layout_gravity="bottom" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent" /> +</FrameLayout> diff --git a/app/src/main/res/layout/activity_edit_transaksi.xml b/app/src/main/res/layout/activity_edit_transaksi.xml index 4c774e5e90c9ea38193e9a0c469ed72f2dd40cce..717af90fea4a0ebd04ecc046750dbeef1e2bbd87 100644 --- a/app/src/main/res/layout/activity_edit_transaksi.xml +++ b/app/src/main/res/layout/activity_edit_transaksi.xml @@ -1,151 +1,161 @@ <?xml version="1.0" encoding="utf-8"?> -<ScrollView +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent"> - <LinearLayout - - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical" - android:padding="16dp"> - - <TextView - android:id="@+id/textViewDateLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Date" - android:layout_marginBottom="8dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" /> - - <TextView - android:id="@+id/editTextDate" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:inputType="none" - android:background="@drawable/edittext_disabled" - android:paddingVertical="6dp" - android:paddingHorizontal="12dp" - android:layout_marginBottom="8dp" - android:hint="Select Date" /> - - <TextView - android:id="@+id/textViewTypeLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Type" - android:layout_marginBottom="8dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" /> - - <TextView - android:id="@+id/editTextType" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:inputType="none" - android:background="@drawable/edittext_disabled" - android:paddingVertical="6dp" - android:paddingHorizontal="12dp" - android:layout_marginBottom="8dp" - android:hint="Income" /> - - <TextView - android:id="@+id/textViewTitleLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Title" - android:layout_marginBottom="8dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" /> - - <EditText - android:id="@+id/editTextTitle" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/edittext_enabled" - android:paddingVertical="6dp" - android:paddingHorizontal="12dp" - android:layout_marginBottom="8dp" - android:hint="Title" /> - - <TextView - android:id="@+id/textViewAmountLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Amount" - android:layout_marginBottom="8dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" /> - - <EditText - android:id="@+id/editTextAmount" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/edittext_enabled" - android:inputType="numberDecimal" - android:paddingVertical="6dp" - android:paddingHorizontal="12dp" - android:layout_marginBottom="8dp" - android:hint="Amount" /> - - <TextView - android:id="@+id/textViewLocationLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Location" - android:layout_marginBottom="8dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" /> - - <EditText - android:id="@+id/editTextLocation" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/edittext_enabled" - android:paddingVertical="6dp" - android:paddingHorizontal="12dp" - android:layout_marginBottom="8dp" - android:hint="Location" /> - - <TextView - android:id="@+id/textViewSeeLocationLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="See on Google Maps" - android:layout_marginBottom="8dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" - android:textStyle="italic" - android:layout_gravity="right"/> - - - <Space - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1"/> - - <Button - android:id="@+id/buttonDelete" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="Delete" - android:backgroundTint="@color/brown_1" - android:textColor="@color/green" /> - - - <Button - android:id="@+id/buttonSubmit" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="Save changes" - android:backgroundTint="@color/green" - android:textColor="@color/white" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintBottom_toBottomOf="parent" /> - - </LinearLayout> - -</ScrollView> + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="16dp"> + <ScrollView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="100dp"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + <TextView + android:id="@+id/textViewDateLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Date" + android:layout_marginBottom="8dp" + android:layout_alignParentTop="true" + android:layout_alignParentStart="true" /> + + <TextView + android:id="@+id/editTextDate" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="none" + android:background="@drawable/edittext_disabled" + android:paddingVertical="6dp" + android:paddingHorizontal="12dp" + android:layout_marginBottom="8dp" + android:hint="Select Date" /> + + <TextView + android:id="@+id/textViewTypeLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Type" + android:layout_marginBottom="8dp" + android:layout_alignParentTop="true" + android:layout_alignParentStart="true" /> + + <TextView + android:id="@+id/editTextType" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="none" + android:background="@drawable/edittext_disabled" + android:paddingVertical="6dp" + android:paddingHorizontal="12dp" + android:layout_marginBottom="8dp" + android:hint="Income" /> + + <TextView + android:id="@+id/textViewTitleLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Title" + android:layout_marginBottom="8dp" + android:layout_alignParentTop="true" + android:layout_alignParentStart="true" /> + + <EditText + android:id="@+id/editTextTitle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/edittext_enabled" + android:paddingVertical="6dp" + android:paddingHorizontal="12dp" + android:layout_marginBottom="8dp" + android:hint="Title" /> + + <TextView + android:id="@+id/textViewAmountLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Amount" + android:layout_marginBottom="8dp" + android:layout_alignParentTop="true" + android:layout_alignParentStart="true" /> + + <EditText + android:id="@+id/editTextAmount" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/edittext_enabled" + android:inputType="numberDecimal" + android:paddingVertical="6dp" + android:paddingHorizontal="12dp" + android:layout_marginBottom="8dp" + android:hint="Amount" /> + + <TextView + android:id="@+id/textViewLocationLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Location" + android:layout_marginBottom="8dp" + android:layout_alignParentTop="true" + android:layout_alignParentStart="true" /> + + <EditText + android:id="@+id/editTextLocation" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/edittext_enabled" + android:paddingVertical="6dp" + android:paddingHorizontal="12dp" + android:layout_marginBottom="8dp" + android:hint="Location" /> + + <TextView + android:id="@+id/textViewSeeLocationLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="See on Google Maps" + android:layout_marginBottom="8dp" + android:layout_alignParentTop="true" + android:layout_alignParentStart="true" + android:textStyle="italic" + android:layout_gravity="right"/> + + + </LinearLayout> + + </ScrollView> + + + <Space + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"/> + + <Button + android:id="@+id/buttonDelete" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Delete" + android:backgroundTint="@color/brown_1" + android:textColor="@color/green" + android:layout_gravity="bottom" + android:layout_marginBottom="50dp"/> + + + <Button + android:id="@+id/buttonSubmit" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Save changes" + android:backgroundTint="@color/green" + android:textColor="@color/white" + android:layout_gravity="bottom" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent" /> + +</FrameLayout> +