it should navigate to Settings, but however I get an exception if it's already on the SettingsFragment? What's the best way to get handle this problem?
Use Navigation component
i'm using
did you attached menu to bottom navigation
show error
java.lang.IllegalArgumentException: Navigation action/destination dev.atahabaki.wordbook:id/action_listFragment_to_settingsFragment cannot be found from the current destination Destination(dev.atahabaki.wordbook:id/settingsFragment) label=SettingsFragment class=dev.atahabaki.wordbook.ui.SettingsFragment at androidx.navigation.NavController.navigate(NavController.java:940) at androidx.navigation.NavController.navigate(NavController.java:877) at androidx.navigation.NavController.navigate(NavController.java:863) at androidx.navigation.NavController.navigate(NavController.java:1159) at dev.atahabaki.wordbook.ui.WordBookActivity.onCreate$lambda-5(WordBookActivity.kt:207) at dev.atahabaki.wordbook.ui.WordBookActivity.lambda$TaL6e-VoMSd6FqdKxCAToe-1GpM(Unknown Source:0) at dev.atahabaki.wordbook.ui.-$$Lambda$WordBookActivity$TaL6e-VoMSd6FqdKxCAToe-1GpM.onNavigationItemSelected(Unknown Source:2) at com.google.android.material.navigation.NavigationView$1.onMenuItemSelected(NavigationView.java:217) at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:834) at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158) at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:985)
it is not in the current back stack
yo man did you read what i've written?
Обсуждают сегодня