Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
activityMainBinding.navigationRail?.setOnItemSelectedListener { item ->
when (item.itemId) {
R.id.alarms -> {
Toast.makeText(this, "Alarms Clicked", Toast.LENGTH_SHORT).show()
true
}
else -> {
Toast.makeText(this, "Other item clicked", Toast.LENGTH_SHORT).show()
true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment