Untitled
unknown
kotlin
3 years ago
538 B
9
Indexable
private fun navigateToSelectedFragment(itemId: Int): Boolean {
when (itemId) {
R.id.homeFragment -> {
// Do something when the "Home" menu item is selected
return true
}
R.id.searchFragment -> {
// Do something when the "Search" menu item is selected
return true
}
R.id.profileFragment -> {
// Do something when the "Profile" menu item is selected
return true
}
else -> return false
}
}Editor is loading...