From 1393207b3f127c794abed1c9323ac061fdf0796a Mon Sep 17 00:00:00 2001 From: Nicola MC Date: Wed, 16 Mar 2022 11:20:11 +0100 Subject: [PATCH] feat: focus alert on selected scan mode --- .../verificaC19/ui/ScanModeDialogFragment.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/it/ministerodellasalute/verificaC19/ui/ScanModeDialogFragment.kt b/app/src/main/java/it/ministerodellasalute/verificaC19/ui/ScanModeDialogFragment.kt index 078040cc..31422348 100644 --- a/app/src/main/java/it/ministerodellasalute/verificaC19/ui/ScanModeDialogFragment.kt +++ b/app/src/main/java/it/ministerodellasalute/verificaC19/ui/ScanModeDialogFragment.kt @@ -65,6 +65,12 @@ class ScanModeDialogFragment(private val ruleSet: RuleSet) : DialogFragment(), S scanModeAdapter = ScanModeAdapter(scanModes, chosenScanMode, this) scanModeBodyLayout.adapter = scanModeAdapter + if (chosenScanMode != -1) { + scanModeBodyLayout.post { + scanModeBodyLayout.smoothScrollToPosition(chosenScanMode) + } + } + val btnClose = view.findViewById(R.id.closeImageView) btnClose.setOnClickListener { dismiss()