diff --git a/app/src/main/java/com/example/pbd_jwr/MainActivity.kt b/app/src/main/java/com/example/pbd_jwr/MainActivity.kt index d6f63f836bca279b93e90bfb9404a03bf4bd1c57..149cf8c73f358145f5fd5d0a6455b7ce4c6becfc 100644 --- a/app/src/main/java/com/example/pbd_jwr/MainActivity.kt +++ b/app/src/main/java/com/example/pbd_jwr/MainActivity.kt @@ -69,7 +69,7 @@ class MainActivity : AppCompatActivity() { // menu should be considered as top level destinations. val appBarConfiguration = AppBarConfiguration( setOf( - R.id.navigation_transaction, R.id.navigation_dashboard, R.id.navigation_settings + R.id.navigation_transaction, R.id.navigation_dashboard, R.id.navigation_settings, R.id.navigation_transaction_add, R.id.navigation_transaction_detail, R.id.navigation_twibbon ) ) setupActionBarWithNavController(navController, appBarConfiguration) diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index 700bd6ed75b2ecab1eb3df65ab9fe6894d83ef2f..c1fbd4afc715bd4c3d8eedb60caa28cd3cb25ced 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -1,11 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" - android:id="@+id/container" xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + tools:context=".MainActivity" + app:layout_constraintTop_toTopOf="parent" + android:overScrollMode="never" + > +<androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/container" tools:context=".LoginActivity" + android:paddingBottom="30dp" > <TextView @@ -85,6 +93,7 @@ android:layout_width="150dp" android:layout_height="60dp" app:layout_constraintTop_toBottomOf="@id/rememberMe" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" android:theme="@style/Theme.login" @@ -93,4 +102,6 @@ android:fontFamily="@font/press_start_2p" android:paddingTop="12dp" /> -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file +</androidx.constraintlayout.widget.ConstraintLayout> + +</ScrollView> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 0a62c782699a00bebe25f55ed10e1915d2ecd708..ab8fb907c88472c9c3c502384f9520a23f144af6 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -5,7 +5,6 @@ android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" - android:paddingTop="10dp" tools:context=".MainActivity" > @@ -28,7 +27,6 @@ android:layout_height="match_parent" app:menu="@menu/bottom_nav_menu" android:layout_marginEnd="20dp" - android:background="@android:color/transparent" app:itemTextAppearanceActive="@style/BottomNavigationView.Active" app:itemTextAppearanceInactive="@style/BottomNavigationView" /> @@ -57,7 +55,9 @@ app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.0" - app:navGraph="@navigation/mobile_navigation" /> + app:navGraph="@navigation/mobile_navigation" + android:layout_marginBottom="60dp" + /> diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml index bae6fbc994efe1e5a0fbc5c2fb575410e3970c1c..da3f3848bfa38319a907afe68514c5e7a2458748 100644 --- a/app/src/main/res/layout/fragment_dashboard.xml +++ b/app/src/main/res/layout/fragment_dashboard.xml @@ -1,9 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent" - tools:context=".ui.dashboard.DashboardFragment"> + android:layout_height="wrap_content" + app:layout_constraintTop_toTopOf="parent" + android:overScrollMode="never" + > +<RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + tools:context=".ui.dashboard.DashboardFragment" + android:paddingBottom="40dp" + > <com.github.mikephil.charting.charts.PieChart android:id="@+id/pieChart" @@ -12,3 +22,4 @@ /> </RelativeLayout> +</ScrollView> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index e63e1f61730113ac85a0083b2b1895b1e1b24e4d..63bd9460c4f303faa4c1c9e65e75a76a3177d39d 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -1,11 +1,18 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" + app:layout_constraintTop_toTopOf="parent" + android:overScrollMode="never" + > + +<androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" tools:context=".ui.settings.SettingsFragment" - android:paddingBottom="50dp" + android:paddingBottom="20dp" > @@ -13,9 +20,9 @@ android:id="@+id/sendEmailButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="24dp" + android:layout_marginTop="16dp" android:drawableEnd="@drawable/baseline_email_24" - android:paddingHorizontal="50dp" + android:paddingHorizontal="20dp" android:text="@string/send_email" app:layout_constraintBottom_toTopOf="@+id/saveBtn" app:layout_constraintLeft_toLeftOf="parent" @@ -29,21 +36,17 @@ android:layout_height="wrap_content" android:text="@string/save" app:layout_constraintTop_toBottomOf="@id/sendEmailButton" - app:layout_constraintHorizontal_bias="0.498" app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toRightOf="parent" - app:layout_constraintVertical_bias="0.221" /> + app:layout_constraintRight_toRightOf="parent" /> <Button android:id="@+id/twibbonButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/twibbon" - app:layout_constraintHorizontal_bias="0.498" app:layout_constraintTop_toBottomOf="@+id/saveBtn" app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toRightOf="parent" - app:layout_constraintVertical_bias="0.024"/> + app:layout_constraintRight_toRightOf="parent" /> <Button android:id="@+id/randomTransactionBtn" @@ -52,7 +55,7 @@ android:text="@string/randomizetransaction" app:layout_constraintTop_toBottomOf="@id/twibbonButton" app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toRightOf="parent" - app:layout_constraintHorizontal_bias="0.497" - app:layout_constraintVertical_bias="0.233" /> -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file + app:layout_constraintRight_toRightOf="parent" /> +</androidx.constraintlayout.widget.ConstraintLayout> + +</ScrollView> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_transaction.xml b/app/src/main/res/layout/fragment_transaction.xml index b68e6ad953576a77ef7786529a70fa20eb214c39..9405331fbf0c9a050c46b154188e66715f3c8ce3 100644 --- a/app/src/main/res/layout/fragment_transaction.xml +++ b/app/src/main/res/layout/fragment_transaction.xml @@ -4,9 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".MainActivity" - android:paddingBottom="50dp" - + tools:context=".ui.transaction.TransactionFragment" > <View android:id="@+id/view" @@ -25,7 +23,9 @@ app:layout_constraintTop_toBottomOf="@id/view" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent"/> + app:layout_constraintEnd_toEndOf="parent" + android:overScrollMode="never" + /> <ImageButton android:id="@+id/btnAdd" diff --git a/app/src/main/res/layout/fragment_transaction_add.xml b/app/src/main/res/layout/fragment_transaction_add.xml index 9acbf35ff3b7fdaf04a55e11415b3363648bdb43..80535a08a7d33ab80ab57aa7c82b80f963bd92c6 100644 --- a/app/src/main/res/layout/fragment_transaction_add.xml +++ b/app/src/main/res/layout/fragment_transaction_add.xml @@ -1,38 +1,48 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent" - android:padding="16dp" - tools:context=".MainActivity" - tools:layout_editor_absoluteX="0dp" - tools:layout_editor_absoluteY="22dp"> + android:layout_height="wrap_content" + android:overScrollMode="never" + > - <!-- Back Button --> - <Button - android:id="@+id/backButton" +<androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingHorizontal="16dp" + tools:context="..ui.transaction.TransactionAddFragment" + android:paddingBottom="30dp" + > + + + <TextView + android:id="@+id/titleAddTransaction" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="16dp" - android:layout_marginTop="16dp" - android:background="?attr/selectableItemBackgroundBorderless" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> - + android:text="Title : " + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toTopOf="@id/editTextTitle" + android:textSize="16sp" + android:paddingHorizontal="2dp" + android:paddingVertical="5dp" + /> <!-- Form Fields --> <EditText android:id="@+id/editTextTitle" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="16dp" - android:layout_marginTop="36dp" - android:layout_marginEnd="16dp" - android:hint="Title" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/backButton" /> + app:layout_constraintTop_toBottomOf="@id/titleAddTransaction" + android:background="@drawable/custom_input" + android:textColor="@color/black" + android:paddingVertical="12dp" + android:paddingHorizontal="8dp" + + /> <!-- Location Field --> @@ -40,52 +50,105 @@ android:id="@+id/spinnerCategory" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="16dp" - android:layout_marginTop="32dp" - android:layout_marginEnd="16dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/editTextTitle" /> + app:layout_goneMarginTop="5dp" + app:layout_constraintTop_toBottomOf="@id/editTextTitle" + android:textColor="@color/black" + android:paddingVertical="12dp" + android:paddingHorizontal="8dp" + app:layout_constraintBottom_toTopOf="@id/titleAmountTransaction" + android:layout_marginTop="10dp" + android:layout_marginBottom="8dp" + /> + + + + <TextView + android:id="@+id/titleAmountTransaction" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Amount :" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toBottomOf="@id/spinnerCategory" + app:layout_constraintBottom_toTopOf="@id/editTextAmount" + android:textSize="16sp" + android:paddingHorizontal="2dp" + android:paddingVertical="5dp" + + /> <EditText android:id="@+id/editTextAmount" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="16dp" - android:layout_marginTop="28dp" - android:layout_marginEnd="16dp" - android:hint="Amount" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/spinnerCategory" /> + app:layout_constraintTop_toBottomOf="@id/titleAmountTransaction" + android:textColor="@color/black" + android:paddingVertical="12dp" + android:paddingHorizontal="8dp" + android:background="@drawable/custom_input" + + /> + + <TextView + android:id="@+id/titleLatTransaction" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Lat : " + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toBottomOf="@id/editTextAmount" + app:layout_constraintBottom_toTopOf="@id/editTextLatitude" + android:textSize="16sp" + android:paddingHorizontal="2dp" + android:paddingVertical="5dp" + /> <EditText android:id="@+id/editTextLatitude" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="16dp" - android:layout_marginTop="28dp" - android:layout_marginEnd="16dp" - android:hint="Latitude" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/editTextAmount" /> + app:layout_constraintTop_toBottomOf="@id/titleLatTransaction" + app:layout_constraintBottom_toTopOf="@id/titleLongTransaction" + android:textColor="@color/black" + android:paddingVertical="12dp" + android:paddingHorizontal="8dp" + android:background="@drawable/custom_input" + /> + + <TextView + android:id="@+id/titleLongTransaction" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Long : " + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toBottomOf="@id/editTextLatitude" + app:layout_constraintBottom_toTopOf="@id/editTextLongitude" + android:textSize="16sp" + android:paddingHorizontal="2dp" + android:paddingVertical="5dp" + /> <EditText android:id="@+id/editTextLongitude" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="16dp" - android:layout_marginTop="20dp" - android:layout_marginEnd="16dp" - android:hint="Longitude" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/editTextLatitude" /> + app:layout_constraintTop_toBottomOf="@id/titleLongTransaction" + app:layout_constraintBottom_toTopOf="@id/btnSubmit" + android:textColor="@color/black" + android:paddingVertical="12dp" + android:paddingHorizontal="8dp" + android:background="@drawable/custom_input" + /> <!-- Submit Button --> @@ -93,12 +156,14 @@ android:id="@+id/btnSubmit" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="16dp" - android:layout_marginBottom="212dp" android:text="@string/submit" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="@id/editTextLongitude" - app:layout_constraintHorizontal_bias="0.533" - app:layout_constraintStart_toStartOf="@id/editTextLongitude" /> + app:layout_constraintTop_toBottomOf="@id/editTextLongitude" + android:layout_marginTop="5dp" + /> </androidx.constraintlayout.widget.ConstraintLayout> + +</ScrollView> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_transaction_detail.xml b/app/src/main/res/layout/fragment_transaction_detail.xml index 8d3cf514701a814c11f86d094e9bbc35ee32fba9..0ba68d8cdf7f0565674dd838413e1b87674f0f5c 100644 --- a/app/src/main/res/layout/fragment_transaction_detail.xml +++ b/app/src/main/res/layout/fragment_transaction_detail.xml @@ -1,10 +1,20 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent" - android:padding="16dp"> + android:layout_height="wrap_content" + app:layout_constraintTop_toTopOf="parent" + android:overScrollMode="never" + > + + +<androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingHorizontal="16dp" + android:paddingBottom="30dp" + > <TextView android:id="@+id/textViewTitle" @@ -168,3 +178,5 @@ </androidx.constraintlayout.widget.ConstraintLayout> + +</ScrollView> \ No newline at end of file diff --git a/app/src/main/res/navigation/mobile_navigation.xml b/app/src/main/res/navigation/mobile_navigation.xml index 38d3dac50f46d188bed251073775efb8c6956bfd..db2ab3746d4aa4c81ab8ac39740aa1b3e2aab492 100644 --- a/app/src/main/res/navigation/mobile_navigation.xml +++ b/app/src/main/res/navigation/mobile_navigation.xml @@ -13,28 +13,34 @@ <action android:id="@+id/action_transactionFragment_to_transactionDetailFragment" - app:destination="@id/navigation_transaction_detail" /> + app:destination="@id/navigation_transaction_detail" + android:label="Transaction Detail" + /> <action android:id="@+id/action_transactionFragment_to_transactionAddFragment" - app:destination="@id/navigation_transaction_add" /> + app:destination="@id/navigation_transaction_add" + android:label="Add Transaction" + /> </fragment> <fragment android:id="@+id/navigation_transaction_detail" android:name="com.example.pbd_jwr.ui.transaction.TransactionDetailFragment" - android:label="" + android:label="Detail Transaction" tools:layout="@layout/fragment_transaction_detail"> <action android:id="@+id/action_transactionDetailFragment_to_transactionAddFragment" - app:destination="@id/navigation_transaction_add" /> + app:destination="@id/navigation_transaction_add" + android:label="Add Transaction" + /> </fragment> <fragment android:id="@+id/navigation_transaction_add" android:name="com.example.pbd_jwr.ui.transaction.TransactionAddFragment" - android:label="" + android:label="Add Transaction" tools:layout="@layout/fragment_transaction_add" /> @@ -60,5 +66,5 @@ <fragment android:id="@+id/navigation_twibbon" android:name="com.example.pbd_jwr.ui.twibbon.TwibbonFragment" - android:label="fragment_twibbon" /> + android:label="Twibbon" /> </navigation> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 62983d09484207a57880fa02e36d40f2a769db49..7584bd2a3d9b345f11fcda9f4b9311e9b57ddb70 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -15,4 +15,9 @@ <string name="save">Save</string> <string name="randomizetransaction">RandomizeTransaction</string> <string name="twibbon">Twibbon</string> + <string name="longitude">Longitude</string> + <string name="latitude">Latitude</string> + <string name="amount">Amount</string> + <string name="title">Title</string> + <string name="back">Back</string> </resources> \ No newline at end of file