Skip to content

Instantly share code, notes, and snippets.

@figonzal1
Created July 12, 2022 16:56
Show Gist options
  • Save figonzal1/290bdc681551bca4389f1ed7f919e3bd to your computer and use it in GitHub Desktop.
Save figonzal1/290bdc681551bca4389f1ed7f919e3bd to your computer and use it in GitHub Desktop.
override fun onOptionsItemSelected(item: MenuItem): Boolean {
// Handle item click
return when (item.itemId) {
R.id.myItem -> {
true
}
else -> super.onOptionsItemSelected(item)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment