From 153506fc83863d49d243adcde6cc3e6bb280d023 Mon Sep 17 00:00:00 2001 From: leca Date: Sat, 16 Nov 2024 15:40:08 +0300 Subject: [PATCH] fixed some layout overflows --- .../FindBarcodelessAbstractProduct.kt | 2 +- .../database/AbstractProductDAO.kt | 2 +- .../fragments/StorageFragment.kt | 2 +- ...vity_find_barcodeless_abstract_product.xml | 19 ++++++++------ app/src/main/res/layout/activity_main.xml | 5 ++-- app/src/main/res/layout/content_storage.xml | 20 --------------- app/src/main/res/layout/fragment_shelf.xml | 3 ++- app/src/main/res/layout/fragment_storage.xml | 25 ++++++++----------- 8 files changed, 31 insertions(+), 47 deletions(-) delete mode 100644 app/src/main/res/layout/content_storage.xml diff --git a/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/FindBarcodelessAbstractProduct.kt b/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/FindBarcodelessAbstractProduct.kt index 32ab155..ef5da60 100644 --- a/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/FindBarcodelessAbstractProduct.kt +++ b/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/FindBarcodelessAbstractProduct.kt @@ -18,7 +18,7 @@ class FindBarcodelessAbstractProduct() : AppCompatActivity() { binding = ActivityFindBarcodelessAbstractProductBinding.inflate(layoutInflater) val ft = supportFragmentManager.beginTransaction() - val fragment = StorageFragment.newInstance("barcodeless", arrayOf("", " ")) + val fragment = StorageFragment.newInstance("barcodeless", arrayOf("", " ", " ")) ft.replace(R.id.content, fragment) ft.commit() diff --git a/app/src/main/java/org/foxarmy/barcodescannerforemployees/database/AbstractProductDAO.kt b/app/src/main/java/org/foxarmy/barcodescannerforemployees/database/AbstractProductDAO.kt index a1b75d0..8cfd903 100644 --- a/app/src/main/java/org/foxarmy/barcodescannerforemployees/database/AbstractProductDAO.kt +++ b/app/src/main/java/org/foxarmy/barcodescannerforemployees/database/AbstractProductDAO.kt @@ -308,7 +308,7 @@ class AbstractProductDAO(private val dbHelper: DBStorageController) { } "barcodeless" -> { - selection = "${AbstractProductContract.AbstractProductEntry.BARCODE} = ? OR ${AbstractProductContract.AbstractProductEntry.BARCODE} = ?" + selection = "${AbstractProductContract.AbstractProductEntry.BARCODE} = ? OR ${AbstractProductContract.AbstractProductEntry.BARCODE} = ? OR ${AbstractProductContract.AbstractProductEntry.BARCODE} = ?" selectionArgs = filter } } diff --git a/app/src/main/java/org/foxarmy/barcodescannerforemployees/fragments/StorageFragment.kt b/app/src/main/java/org/foxarmy/barcodescannerforemployees/fragments/StorageFragment.kt index 071359d..dacf52b 100644 --- a/app/src/main/java/org/foxarmy/barcodescannerforemployees/fragments/StorageFragment.kt +++ b/app/src/main/java/org/foxarmy/barcodescannerforemployees/fragments/StorageFragment.kt @@ -194,7 +194,7 @@ class StorageFragment : Fragment() { val args = Bundle() args.putString("filterBy", filterBy) args.putStringArray("filter", filter) - fragment.setArguments(args) + fragment.arguments = args return fragment } diff --git a/app/src/main/res/layout/activity_find_barcodeless_abstract_product.xml b/app/src/main/res/layout/activity_find_barcodeless_abstract_product.xml index ad84073..9f7eb20 100644 --- a/app/src/main/res/layout/activity_find_barcodeless_abstract_product.xml +++ b/app/src/main/res/layout/activity_find_barcodeless_abstract_product.xml @@ -1,10 +1,15 @@ - + 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"> - \ 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 b7f2426..1fb4140 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -39,12 +39,13 @@ + app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="6dp" + app:layout_constraintBottom_toBottomOf="parent"/> - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_shelf.xml b/app/src/main/res/layout/fragment_shelf.xml index 83a3c85..630c76b 100644 --- a/app/src/main/res/layout/fragment_shelf.xml +++ b/app/src/main/res/layout/fragment_shelf.xml @@ -26,7 +26,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" app:layout_constraintTop_toBottomOf="@+id/spinner" android:layout_marginTop="32dp" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent" android:id="@+id/scrollView"> + app:layout_constraintEnd_toEndOf="parent" android:id="@+id/scrollView" + app:layout_constraintBottom_toBottomOf="parent"> - - + + + app:layout_constraintBottom_toTopOf="@+id/scrollView2"/> + app:layout_constraintTop_toBottomOf="@+id/dropFiltersButton" + android:layout_marginTop="4dp" app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent"> - \ No newline at end of file