Untitled

Anonymous
kotlin
02/20/2023 2:10 PM
720 B
19
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...