Skip to content

Instantly share code, notes, and snippets.

@navczydev
Created July 10, 2021 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save navczydev/3c9e40bfb2478997e95edd2b4c19c2d9 to your computer and use it in GitHub Desktop.
Save navczydev/3c9e40bfb2478997e95edd2b4c19c2d9 to your computer and use it in GitHub Desktop.
activityMainBinding.navigationRail?.setOnItemReselectedListener { 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