mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-06-05 21:49:13 +02:00
Make current unit selected in dialog for selecting unit
This commit is contained in:
@ -173,7 +173,7 @@ class ConverterView @JvmOverloads constructor(
|
||||
val items = ArrayList(converter!!.units.mapIndexed { index, unit ->
|
||||
RadioItem(index, context.getString(unit.nameResId), unit)
|
||||
})
|
||||
RadioGroupDialog(context as Activity, items) {
|
||||
RadioGroupDialog(context as Activity, items, converter!!.units.indexOf(propertyToChange.get())) {
|
||||
val unit = it as Converter.Unit
|
||||
if (unit == otherProperty.get()) {
|
||||
switch()
|
||||
|
Reference in New Issue
Block a user