Example of single choice item on Android.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
.gitignore
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Android-SingleChoiceItem

Example of single choice item on Android.

https://kikopalomares.com

val builderSingle = AlertDialog.Builder(this)
builderSingle.setTitle("Select")
builderSingle.setPositiveButton(getString(android.R.string.ok)) { dialog, _ -> dialog.dismiss() }
builderSingle.setSingleChoiceItems(options, defaultPosition) { _, which ->
    defaultPosition = which
    itemSelected.text = options[which]
}
builderSingle.show()

Puedes ver el video donde se explica como hacer este codigo: https://www.youtube.com/watch?v=zGOVwCHCpUY