Untitled

 avatar
unknown
kotlin
2 years ago
538 B
5
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...