dynamically change spinner selected item code example
Example: how to set current item for spinner android
val b: List = a.mapIndexed { i, b -> if (b) i else null }.filterNotNull().toList()
spinnerObject.setSelection(b.get(0))
val b: List = a.mapIndexed { i, b -> if (b) i else null }.filterNotNull().toList()
spinnerObject.setSelection(b.get(0))