From 19fd23e61619d03c37676e2581ae94cfd5cedc85 Mon Sep 17 00:00:00 2001 From: leca Date: Fri, 4 Oct 2024 18:56:53 +0300 Subject: [PATCH] commit before refactor --- .../foxarmy/barcodescannerforemployees/AbstractProductView.kt | 1 - .../foxarmy/barcodescannerforemployees/AddProductFragment.kt | 3 --- .../org/foxarmy/barcodescannerforemployees/MainActivity.kt | 4 +++- app/src/main/res/menu/menu_main.xml | 1 + 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/foxarmy/barcodescannerforemployees/AbstractProductView.kt b/app/src/main/java/org/foxarmy/barcodescannerforemployees/AbstractProductView.kt index 879690d..ab04687 100644 --- a/app/src/main/java/org/foxarmy/barcodescannerforemployees/AbstractProductView.kt +++ b/app/src/main/java/org/foxarmy/barcodescannerforemployees/AbstractProductView.kt @@ -38,7 +38,6 @@ class AbstractProductView: LinearLayout { val thumbnailsDir = File(context.cacheDir, "thumbnails") thumbnailsDir.mkdirs() val imageUri = getImageUri(activity, File(thumbnailsDir, "$productImageHash.webp")) - Log.d("QWERTYUIOP", "${productPicture.minimumWidth}x${productPicture.minimumHeight}") productPicture.setImageURI(imageUri) productPicture.rotation = 90f productPicture.setOnClickListener { diff --git a/app/src/main/java/org/foxarmy/barcodescannerforemployees/AddProductFragment.kt b/app/src/main/java/org/foxarmy/barcodescannerforemployees/AddProductFragment.kt index 684cc8f..a2d4d32 100644 --- a/app/src/main/java/org/foxarmy/barcodescannerforemployees/AddProductFragment.kt +++ b/app/src/main/java/org/foxarmy/barcodescannerforemployees/AddProductFragment.kt @@ -65,9 +65,6 @@ class AddProductFragment : Fragment() { //Saving picture to a temp file for further hash calculation and moving to a proper directory val imageFile = File(requireContext().filesDir, "image.png") val imageUri = getImageUri(requireActivity(), imageFile) - if (imageUri != null) { - Log.d("QWERTYUIOP", imageUri.path.toString()) - } takePicture.launch(imageUri) } diff --git a/app/src/main/java/org/foxarmy/barcodescannerforemployees/MainActivity.kt b/app/src/main/java/org/foxarmy/barcodescannerforemployees/MainActivity.kt index 65e7fd2..6913fbd 100644 --- a/app/src/main/java/org/foxarmy/barcodescannerforemployees/MainActivity.kt +++ b/app/src/main/java/org/foxarmy/barcodescannerforemployees/MainActivity.kt @@ -39,7 +39,9 @@ class MainActivity : AppCompatActivity() { override fun onOptionsItemSelected(item: MenuItem): Boolean { return when (item.itemId) { - R.id.action_settings -> true + R.id.action_settings -> { + true + } else -> super.onOptionsItemSelected(item) } } diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index 4530dd5..d6cb720 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -6,4 +6,5 @@ android:title="@string/action_settings" android:orderInCategory="100" app:showAsAction="never"/> + \ No newline at end of file