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()