Skip to content

Instantly share code, notes, and snippets.

@navczydev
Last active September 4, 2022 15:57
Show Gist options
  • Save navczydev/5400b6e3124b03580e275f7c19309750 to your computer and use it in GitHub Desktop.
Save navczydev/5400b6e3124b03580e275f7c19309750 to your computer and use it in GitHub Desktop.
rgChoices.setOnCheckedChangeListener { _, index ->
when {
index == R.id.rb_choice1 && rbChoice1.isChecked -> {
Log.d(TAG, "onCreate: First choice checked")
}
index == R.id.rb_choice2 && rbChoice2.isChecked -> {
Log.d(TAG, "onCreate: Second choice checked")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment