diff --git a/app/src/main/java/com/example/bondoman/activities/AddTransaction.kt b/app/src/main/java/com/example/bondoman/activities/AddTransaction.kt index 1d3779673f07b82b4a606adf69711f9114ecebbc..d5a5ce4b27a44ffb30b4c4b08c6277c4ff525f6b 100644 --- a/app/src/main/java/com/example/bondoman/activities/AddTransaction.kt +++ b/app/src/main/java/com/example/bondoman/activities/AddTransaction.kt @@ -6,12 +6,10 @@ import android.content.Intent import android.os.Bundle import android.content.BroadcastReceiver import android.content.Context -import android.content.Intent import android.content.IntentFilter import android.content.pm.PackageManager import android.location.Geocoder import android.location.Location -import android.os.Bundle import android.text.TextUtils import android.util.Log import android.widget.ArrayAdapter @@ -84,8 +82,6 @@ class AddTransaction : AppCompatActivity() { val category = spinnerCategory.selectedItem.toString() val amount = editTextAmount.text.toString().toFloatOrNull() ?: 0f val location = editTextLocation.text.toString() - val amount = findViewById<EditText>(R.id.editTextAmount).text.toString().toFloatOrNull() ?: 0f - val location = locationText.text.toString() val replyIntent = Intent() if (title.isEmpty()) { diff --git a/app/src/main/java/com/example/bondoman/activities/MainActivity.kt b/app/src/main/java/com/example/bondoman/activities/MainActivity.kt index 7f1a1dd95e79abb0dc6fcef13c090de26a390322..2b0606100a59c9a38a588c39a1f512033c5ea646 100644 --- a/app/src/main/java/com/example/bondoman/activities/MainActivity.kt +++ b/app/src/main/java/com/example/bondoman/activities/MainActivity.kt @@ -75,14 +75,10 @@ class MainActivity : AppCompatActivity() { // Change layout to show left navigation bottomNavigationView.visibility = View.GONE navigationView.visibility = View.VISIBLE - navFragmentLayoutParams.leftToRight = R.id.navigation_view - fragment.view?.layoutParams = navFragmentLayoutParams } else { // Set up bottom navigation bar bottomNavigationView.visibility = View.VISIBLE navigationView.visibility = View.GONE - navFragmentLayoutParams.leftToLeft = ConstraintLayout.LayoutParams.PARENT_ID - fragment.view?.layoutParams = navFragmentLayoutParams } navigationView.setNavigationItemSelectedListener { menuItem : MenuItem -> @@ -107,14 +103,10 @@ class MainActivity : AppCompatActivity() { // Change layout to show left navigation bottomNavigationView.visibility = View.GONE navigationView.visibility = View.VISIBLE - navFragmentLayoutParams.leftToRight = R.id.navigation_view - fragment.view?.layoutParams = navFragmentLayoutParams } else { // Change layout to show bottom navigation bar bottomNavigationView.visibility = View.VISIBLE navigationView.visibility = View.GONE - navFragmentLayoutParams.leftToLeft = ConstraintLayout.LayoutParams.PARENT_ID - fragment.view?.layoutParams = navFragmentLayoutParams } } diff --git a/app/src/main/java/com/example/bondoman/fragments/SettingsFragment.kt b/app/src/main/java/com/example/bondoman/fragments/SettingsFragment.kt index b3fef09cf849add6a337c936ecb780d8c9d94ef6..fdcf5f355f033be13c33064711ad509eb49bf5f7 100644 --- a/app/src/main/java/com/example/bondoman/fragments/SettingsFragment.kt +++ b/app/src/main/java/com/example/bondoman/fragments/SettingsFragment.kt @@ -98,6 +98,7 @@ class SettingsFragment : Fragment() { } binding.randomizeButton.setOnClickListener { broadcastRandomizeTransaction() + } binding.logoutButton.setOnClickListener{ lifecycleScope.launch { showLoading() diff --git a/app/src/main/res/layout/activity_add_transaksi.xml b/app/src/main/res/layout/activity_add_transaksi.xml index a50e5d76a2a9761e2c96317b6ecf47f7790166ec..bdf9c6244d52db0d6ac43785de38e70c17ea08b7 100644 --- a/app/src/main/res/layout/activity_add_transaksi.xml +++ b/app/src/main/res/layout/activity_add_transaksi.xml @@ -1,116 +1,123 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout + +<ScrollView 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" - android:orientation="vertical" - android:padding="16dp"> + 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/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/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" + <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" + 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" - style="@style/Widget.AppCompat.DropDownItem.Spinner" - android:textSize="18sp" + android:background="@drawable/edittext_enabled" + android:inputType="numberDecimal" android:paddingVertical="6dp" android:paddingHorizontal="12dp" - /> - </RelativeLayout> + 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/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" /> + <Space + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"/> - <Space - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1"/> + <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" /> - <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" /> + </LinearLayout> +</ScrollView> -</LinearLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_edit_transaksi.xml b/app/src/main/res/layout/activity_edit_transaksi.xml index f5771c5fe288b785eae7096276ebcffdf41fa5d5..4c774e5e90c9ea38193e9a0c469ed72f2dd40cce 100644 --- a/app/src/main/res/layout/activity_edit_transaksi.xml +++ b/app/src/main/res/layout/activity_edit_transaksi.xml @@ -1,146 +1,151 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout +<ScrollView 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" - 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"/> + android:layout_height="match_parent"> + <LinearLayout - <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> \ No newline at end of file + 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> diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index 115690c103b163558e111b8c5ab9e9073f9b0792..bbe432c5ab5a87aecc50f2e9dc0081665f229abb 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -29,8 +29,6 @@ android:id="@+id/login_card" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginHorizontal="40dp" - android:layout_marginEnd="8dp" app:cardCornerRadius="30dp" app:cardElevation="4dp" app:layout_constraintBottom_toBottomOf="parent" diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 7d24c5d4bc2228d9f5a47daef3c53dae760b786d..be2dba81140f7a73a50ec9f94977ee33dc081953 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -10,22 +10,23 @@ <fragment android:id="@+id/nav_fragment" android:name="androidx.navigation.fragment.NavHostFragment" - android:layout_width="match_parent" + android:layout_width="0dp" android:layout_height="0dp" app:defaultNavHost="true" app:layout_constraintBottom_toTopOf="@+id/bottom_navigation_view" - app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintLeft_toRightOf="@+id/navigation_view" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" app:navGraph="@navigation/nav_graph"/> <com.google.android.material.navigation.NavigationView android:id="@+id/navigation_view" - android:layout_width="70dp" + android:layout_width="60dp" android:layout_height="match_parent" android:layout_gravity="left" app:itemIconTint="@color/menu_color" app:itemTextColor="@color/green" + android:backgroundTint="@color/brown_1" app:itemBackground="@color/brown_1" android:background="?android:attr/windowBackground" app:layout_constraintBottom_toBottomOf="parent" @@ -41,6 +42,8 @@ app:itemIconTint="@color/menu_color" app:itemTextColor="@color/green" app:itemBackground="@color/brown_1" + android:backgroundTint="@color/brown_1" + app:itemHorizontalTranslationEnabled="false" android:background="?android:attr/windowBackground" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index 71114062d9e7c68054898799c702edb0300df9da..38b1d48794ae75ba6aca6ae18494660b78b0429b 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -6,106 +6,110 @@ android:layout_height="match_parent" android:background="@color/bg_color" tools:context=".fragments.SettingsFragment"> - - <androidx.constraintlayout.widget.ConstraintLayout + <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="match_parent"> - <LinearLayout - android:id="@+id/settings_linear_layout" - android:layout_width="329dp" - android:layout_height="wrap_content" - android:orientation="vertical" - android:background="@color/bg_color" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintVertical_bias="0.175"> - - <Button - android:id="@+id/save_button" - android:layout_width="match_parent" + <LinearLayout + android:id="@+id/settings_linear_layout" + android:layout_width="329dp" android:layout_height="wrap_content" - android:layout_marginBottom="24dp" - android:background="@drawable/button_background" - android:drawableStart="@drawable/ic_download" - android:drawablePadding="16dp" - android:elevation="24dp" - android:paddingHorizontal="16dp" - android:paddingVertical="16dp" - android:text="@string/save_button_text" - android:textAlignment="viewStart" - android:textAllCaps="false" - android:textSize="17sp" - android:textStyle="bold" /> + android:orientation="vertical" + android:background="@color/bg_color" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.175"> - <Button - android:id="@+id/send_button" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="24dp" - android:background="@drawable/button_background" - android:drawableStart="@drawable/ic_send" - android:drawablePadding="16dp" - android:paddingHorizontal="16dp" - android:paddingVertical="16dp" - android:text="@string/send_button_text" - android:textAlignment="viewStart" - android:textAllCaps="false" - android:textSize="17sp" - android:textStyle="bold" /> + <Button + android:id="@+id/save_button" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="24dp" + android:background="@drawable/button_background" + android:drawableStart="@drawable/ic_download" + android:drawablePadding="16dp" + android:elevation="24dp" + android:paddingHorizontal="16dp" + android:paddingVertical="16dp" + android:text="@string/save_button_text" + android:textAlignment="viewStart" + android:textAllCaps="false" + android:textSize="17sp" + android:textStyle="bold" /> - <Button - android:id="@+id/randomize_button" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="24dp" - android:background="@drawable/button_background" - android:drawableStart="@drawable/ic_randomize" - android:drawablePadding="16dp" - android:paddingHorizontal="16dp" - android:paddingVertical="16dp" - android:text="Generate Random Transaction" - android:textAlignment="viewStart" - android:textAllCaps="false" - android:textSize="17sp" - android:textStyle="bold" /> + <Button + android:id="@+id/send_button" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="24dp" + android:background="@drawable/button_background" + android:drawableStart="@drawable/ic_send" + android:drawablePadding="16dp" + android:paddingHorizontal="16dp" + android:paddingVertical="16dp" + android:text="@string/send_button_text" + android:textAlignment="viewStart" + android:textAllCaps="false" + android:textSize="17sp" + android:textStyle="bold" /> - <Button - android:id="@+id/logout_button" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="24dp" - android:background="@drawable/button_background" - android:drawableStart="@drawable/ic_logout" - android:drawablePadding="16dp" - android:paddingHorizontal="16dp" - android:paddingVertical="16dp" - android:text="@string/logout_button_text" - android:textAlignment="viewStart" - android:textAllCaps="false" - android:textSize="17sp" - android:textStyle="bold" /> + <Button + android:id="@+id/randomize_button" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="24dp" + android:background="@drawable/button_background" + android:drawableStart="@drawable/ic_randomize" + android:drawablePadding="16dp" + android:paddingHorizontal="16dp" + android:paddingVertical="16dp" + android:text="Generate Random Transaction" + android:textAlignment="viewStart" + android:textAllCaps="false" + android:textSize="17sp" + android:textStyle="bold" /> + + <Button + android:id="@+id/logout_button" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="24dp" + android:background="@drawable/button_background" + android:drawableStart="@drawable/ic_logout" + android:drawablePadding="16dp" + android:paddingHorizontal="16dp" + android:paddingVertical="16dp" + android:text="@string/logout_button_text" + android:textAlignment="viewStart" + android:textAllCaps="false" + android:textSize="17sp" + android:textStyle="bold" /> + + <com.airbnb.lottie.LottieAnimationView + android:id="@+id/loadingAnimation" + android:layout_width="335dp" + android:layout_height="95dp" + app:lottie_autoPlay="true" + app:lottie_loop="true" + app:lottie_rawRes="@raw/loading" /> + </LinearLayout> - <com.airbnb.lottie.LottieAnimationView - android:id="@+id/loadingAnimation" - android:layout_width="335dp" - android:layout_height="95dp" - app:lottie_autoPlay="true" - app:lottie_loop="true" - app:lottie_rawRes="@raw/loading" /> - </LinearLayout> + <androidx.coordinatorlayout.widget.CoordinatorLayout + android:id="@+id/snackbarContainer" + android:layout_width="309dp" + android:layout_height="197dp" + android:orientation="vertical" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/settings_linear_layout" + app:layout_constraintVertical_bias="0.421" /> + </androidx.constraintlayout.widget.ConstraintLayout> + </ScrollView> - <androidx.coordinatorlayout.widget.CoordinatorLayout - android:id="@+id/snackbarContainer" - android:layout_width="309dp" - android:layout_height="197dp" - android:orientation="vertical" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/settings_linear_layout" - app:layout_constraintVertical_bias="0.421" /> - </androidx.constraintlayout.widget.ConstraintLayout> </FrameLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_transaksi.xml b/app/src/main/res/layout/fragment_transaksi.xml index 42df984082f2b5695565457caed71a8d791b7062..0ea9128419aa3941976e030f41e8f864fae2febf 100644 --- a/app/src/main/res/layout/fragment_transaksi.xml +++ b/app/src/main/res/layout/fragment_transaksi.xml @@ -7,11 +7,6 @@ tools:context=".fragments.TransaksiFragment" android:padding="16dp"> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:id="@+id/test" - /> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match_parent" diff --git a/app/src/main/res/layout/fragment_twibbon.xml b/app/src/main/res/layout/fragment_twibbon.xml index e070c02f2e45bb1e015d20d61f0684f5329b60a4..0a2e513ef3ae923ba1b7f2a939fb0607831d5f8d 100644 --- a/app/src/main/res/layout/fragment_twibbon.xml +++ b/app/src/main/res/layout/fragment_twibbon.xml @@ -5,109 +5,122 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".fragments.TwibbonFragment"> + tools:context=".fragments.TwibbonFragment" + android:layout_gravity="center"> - <LinearLayout + <ScrollView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintLeft_toLeftOf="parent" + android:foregroundGravity="center" app:layout_constraintRight_toRightOf="parent" + app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - android:gravity="center" > + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + android:paddingVertical="30dp" + android:gravity="center" + > - <FrameLayout - android:layout_width="300dp" - android:layout_height="wrap_content" - android:layout_marginBottom="20dp"> <FrameLayout - android:id="@+id/preview" android:layout_width="300dp" - android:layout_height="300dp" - android:layout_gravity="center"> - <androidx.camera.view.PreviewView - android:id="@+id/viewFinder" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:scaleType="fitCenter"/> + android:layout_height="wrap_content" + android:layout_marginBottom="20dp"> + <FrameLayout + android:id="@+id/preview" + android:layout_width="300dp" + android:layout_height="300dp" + android:layout_gravity="center"> + <androidx.camera.view.PreviewView + android:id="@+id/viewFinder" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="fitCenter"/> + </FrameLayout> + + <ImageView + android:id="@+id/overlay_image" + android:layout_width="300dp" + android:layout_height="300dp" + android:layout_gravity="center" + android:scaleType="fitCenter" + android:src="@drawable/twibbon_1" /> + <ImageView + android:id="@+id/imageView" + android:layout_width="300dp" + android:layout_height="300dp" + android:visibility="gone" + android:scaleType="centerCrop" + android:layout_gravity="center"/> </FrameLayout> + <HorizontalScrollView + android:id="@+id/horizontalScrollView" + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <ImageView - android:id="@+id/overlay_image" - android:layout_width="300dp" - android:layout_height="300dp" - android:layout_gravity="center" - android:scaleType="fitCenter" - android:src="@drawable/twibbon_1" /> - <ImageView - android:id="@+id/imageView" - android:layout_width="300dp" - android:layout_height="300dp" - android:visibility="gone" - android:scaleType="centerCrop" - android:layout_gravity="center"/> - </FrameLayout> - <HorizontalScrollView - android:id="@+id/horizontalScrollView" - android:layout_width="match_parent" - android:layout_height="wrap_content"> + <LinearLayout + android:id="@+id/buttonContainer" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal"> - <LinearLayout - android:id="@+id/buttonContainer" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal"> + <Button + android:id="@+id/button1" + android:layout_width="80dp" + android:layout_height="80dp" + android:background="@drawable/twibbon_1" + android:layout_marginEnd="10dp"/> - <Button - android:id="@+id/button1" - android:layout_width="80dp" - android:layout_height="80dp" - android:background="@drawable/twibbon_1" - android:layout_marginEnd="10dp"/> + <Button + android:id="@+id/button2" + android:layout_width="80dp" + android:layout_height="80dp" + android:background="@drawable/twibbon_2" + android:layout_marginEnd="10dp"/> - <Button - android:id="@+id/button2" - android:layout_width="80dp" - android:layout_height="80dp" - android:background="@drawable/twibbon_2" - android:layout_marginEnd="10dp"/> + <Button + android:id="@+id/button3" + android:layout_width="80dp" + android:layout_height="80dp" + android:background="@drawable/twibbon_3" + android:layout_marginEnd="10dp"/> - <Button - android:id="@+id/button3" - android:layout_width="80dp" - android:layout_height="80dp" - android:background="@drawable/twibbon_3" - android:layout_marginEnd="10dp"/> + <Button + android:id="@+id/button4" + android:layout_width="80dp" + android:layout_height="80dp" + android:background="@drawable/twibbon_4" + android:layout_marginEnd="10dp"/> + <Button + android:id="@+id/button5" + android:layout_width="80dp" + android:layout_height="80dp" + android:background="@drawable/twibbon_5"/> - <Button - android:id="@+id/button4" - android:layout_width="80dp" - android:layout_height="80dp" - android:background="@drawable/twibbon_4" - android:layout_marginEnd="10dp"/> - <Button - android:id="@+id/button5" - android:layout_width="80dp" - android:layout_height="80dp" - android:background="@drawable/twibbon_5"/> + <!-- Add more buttons as needed --> - <!-- Add more buttons as needed --> + </LinearLayout> + </HorizontalScrollView> - </LinearLayout> - </HorizontalScrollView> + <Button + android:id="@+id/image_capture_button" + android:layout_width="90dp" + android:layout_height="50dp" + android:layout_marginTop="20dp" + android:background="@drawable/button_green" + android:textColor="@color/white" + android:elevation="2dp" + android:text="CAPTURE" + app:layout_constraintTop_toBottomOf="@id/viewFinder"/> - <Button - android:id="@+id/image_capture_button" - android:layout_width="90dp" - android:layout_height="50dp" - android:layout_marginTop="20dp" - android:background="@drawable/button_green" - android:textColor="@color/white" - android:elevation="2dp" - android:text="CAPTURE" - app:layout_constraintTop_toBottomOf="@id/viewFinder"/> + </LinearLayout> - </LinearLayout> + </ScrollView> </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file