From e5d249911003d75e7e467f8f9886ecc35e4d352f Mon Sep 17 00:00:00 2001 From: MHEN007 <13521007@std.stei.itb.ac.id> Date: Fri, 5 Apr 2024 09:27:15 +0700 Subject: [PATCH] chore: Accessability Issues --- app/src/main/java/com/mhn/bondoman/ui/scan/ScanResult.kt | 1 - app/src/main/res/layout-land/fragment_add_transaction.xml | 5 +++++ app/src/main/res/layout-land/fragment_scan.xml | 4 ++-- .../main/res/layout-land/fragment_transaction_update.xml | 5 +++++ app/src/main/res/layout/fragment_add_transaction.xml | 7 ++++++- app/src/main/res/layout/fragment_scan.xml | 2 +- app/src/main/res/layout/fragment_transaction_update.xml | 6 +++++- app/src/main/res/layout/transaction_item.xml | 8 +++++--- app/src/main/res/values/strings.xml | 3 +++ 9 files changed, 32 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/mhn/bondoman/ui/scan/ScanResult.kt b/app/src/main/java/com/mhn/bondoman/ui/scan/ScanResult.kt index d1233bb..49ddc6e 100644 --- a/app/src/main/java/com/mhn/bondoman/ui/scan/ScanResult.kt +++ b/app/src/main/java/com/mhn/bondoman/ui/scan/ScanResult.kt @@ -43,7 +43,6 @@ class ScanResult : Fragment() { gpsService = LocationAdapter.getInstance(requireActivity()) getLocation() - val recyclerView = binding.rvScanResponse viewModel.scanResultData.observe(viewLifecycleOwner, Observer {resultData -> resultData.let { it.items.let { diff --git a/app/src/main/res/layout-land/fragment_add_transaction.xml b/app/src/main/res/layout-land/fragment_add_transaction.xml index e00f463..27ee1cc 100644 --- a/app/src/main/res/layout-land/fragment_add_transaction.xml +++ b/app/src/main/res/layout-land/fragment_add_transaction.xml @@ -39,6 +39,7 @@ android:id="@+id/etTitle" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:ems="10" android:hint="@string/title_name" android:padding="5dp" /> @@ -55,6 +56,7 @@ android:id="@+id/etNominal" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:ems="10" android:hint="@string/nominal" android:padding="5dp" /> @@ -64,6 +66,7 @@ android:id="@+id/etKategori" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="10dp" android:background="@drawable/spinnerborder" android:ems="10" @@ -76,12 +79,14 @@ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="10dp"> <com.google.android.material.textfield.TextInputEditText android:id="@+id/etLokasi" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:hint="@string/location_name" android:padding="5dp" /> </com.google.android.material.textfield.TextInputLayout> diff --git a/app/src/main/res/layout-land/fragment_scan.xml b/app/src/main/res/layout-land/fragment_scan.xml index ac96b54..e52fa42 100644 --- a/app/src/main/res/layout-land/fragment_scan.xml +++ b/app/src/main/res/layout-land/fragment_scan.xml @@ -45,7 +45,7 @@ android:layout_height="64dp" android:background="@drawable/rounded_item_camera" android:backgroundTint="@color/white" - android:contentDescription="@string/media_btn" + android:contentDescription="@string/switch_camera_button" android:elevation="1dp" android:src="@drawable/ic_camera_switch" app:tint="@color/black" /> @@ -89,7 +89,7 @@ app:layout_constraintBottom_toTopOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent"></androidx.camera.view.PreviewView> + app:layout_constraintTop_toTopOf="parent" /> <ImageView android:id="@+id/imageView" diff --git a/app/src/main/res/layout-land/fragment_transaction_update.xml b/app/src/main/res/layout-land/fragment_transaction_update.xml index d982fa5..eb81a44 100644 --- a/app/src/main/res/layout-land/fragment_transaction_update.xml +++ b/app/src/main/res/layout-land/fragment_transaction_update.xml @@ -39,6 +39,7 @@ android:id="@+id/etTitle" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="100dp" android:ems="10" android:hint="@string/title_name" @@ -51,6 +52,7 @@ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height="match_parent" + android:minHeight="48dp" android:layout_marginTop="20dp" app:layout_constraintTop_toBottomOf="@+id/titleLayout"> @@ -58,6 +60,7 @@ android:id="@+id/etNominal" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="60dp" android:ems="10" android:hint="@string/nominal" @@ -69,12 +72,14 @@ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height="match_parent" + android:minHeight="48dp" android:layout_marginTop="20dp"> <com.google.android.material.textfield.TextInputEditText android:id="@+id/etLokasi" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="20dp" android:ems="10" android:hint="@string/location_name" diff --git a/app/src/main/res/layout/fragment_add_transaction.xml b/app/src/main/res/layout/fragment_add_transaction.xml index d29502b..a80bce5 100644 --- a/app/src/main/res/layout/fragment_add_transaction.xml +++ b/app/src/main/res/layout/fragment_add_transaction.xml @@ -40,6 +40,7 @@ android:id="@+id/etTitle" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="100dp" android:hint="@string/title_name" android:inputType="text" @@ -58,6 +59,7 @@ android:id="@+id/etNominal" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="60dp" android:ems="10" android:hint="@string/nominal" @@ -68,7 +70,8 @@ <androidx.appcompat.widget.AppCompatSpinner android:id="@+id/etKategori" android:layout_width="match_parent" - android:layout_height="50dp" + android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="30dp" android:background="@drawable/spinnerborder" android:ems="10" @@ -82,12 +85,14 @@ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height="match_parent" + android:minHeight="48dp" android:layout_marginTop="30dp"> <com.google.android.material.textfield.TextInputEditText android:id="@+id/etLokasi" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="20dp" android:ems="10" android:hint="@string/location_name" diff --git a/app/src/main/res/layout/fragment_scan.xml b/app/src/main/res/layout/fragment_scan.xml index 8a5571b..25a5a62 100644 --- a/app/src/main/res/layout/fragment_scan.xml +++ b/app/src/main/res/layout/fragment_scan.xml @@ -50,7 +50,7 @@ android:layout_height="64dp" android:backgroundTint="@color/white" android:background="@drawable/rounded_item_camera" - android:contentDescription="@string/media_btn" + android:contentDescription="@string/switch_camera_button" android:src="@drawable/ic_camera_switch" android:elevation="1dp" app:tint="@color/black" /> diff --git a/app/src/main/res/layout/fragment_transaction_update.xml b/app/src/main/res/layout/fragment_transaction_update.xml index 4f3c994..e6d0f00 100644 --- a/app/src/main/res/layout/fragment_transaction_update.xml +++ b/app/src/main/res/layout/fragment_transaction_update.xml @@ -39,6 +39,7 @@ android:id="@+id/etTitle" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="100dp" android:ems="10" android:hint="@string/title_name" @@ -51,6 +52,7 @@ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height="match_parent" + android:minHeight="48dp" android:layout_marginTop="20dp" app:layout_constraintTop_toBottomOf="@+id/titleLayout"> @@ -58,6 +60,7 @@ android:id="@+id/etNominal" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="60dp" android:ems="10" android:hint="@string/nominal" @@ -75,6 +78,7 @@ android:id="@+id/etLokasi" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="48dp" android:layout_marginTop="20dp" android:ems="10" android:hint="@string/location_name" @@ -103,7 +107,7 @@ android:layout_height="wrap_content" android:layout_marginTop="10dp" android:backgroundTint="@color/material_dynamic_primary10" - android:text="Update Location" + android:text="@string/update_location" android:textColor="@color/white" /> <Button diff --git a/app/src/main/res/layout/transaction_item.xml b/app/src/main/res/layout/transaction_item.xml index f953c00..f0a7fc7 100644 --- a/app/src/main/res/layout/transaction_item.xml +++ b/app/src/main/res/layout/transaction_item.xml @@ -23,7 +23,8 @@ android:layout_gravity="end|center_vertical" android:layout_alignParentEnd="true" android:background="@android:color/transparent" - android:src="@drawable/ic_trash" /> + android:src="@drawable/ic_trash" + android:contentDescription="@string/delete_button"/> <TextView android:id="@+id/tvKategori" @@ -64,14 +65,15 @@ android:src="@drawable/ic_map_marker" android:layout_alignParentEnd="true" android:layout_below="@+id/price" - android:layout_marginTop="10dp" /> + android:layout_marginTop="10dp" + android:contentDescription="@string/location_symbol" /> <TextView android:id="@+id/Location" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@id/locationSymbol" - android:layout_marginRight="10dp" + android:layout_marginEnd="10dp" android:layout_toStartOf="@+id/locationSymbol" android:text="@string/location_name" android:textColor="@color/white" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index eaae976..3eaa515 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -46,4 +46,7 @@ <string name="switch_camera_button">Switch Camera</string> <string name="twibbon_image">Twibbon Image</string> <string name="floating_add_transaction_button">Floating Add Transaction</string> + <string name="delete_button">Delete Button</string> + <string name="location_symbol">Location Symbol</string> + <string name="update_location">Update Location</string> </resources> \ No newline at end of file -- GitLab