The navigation from menus is working fine, but when I added the FAB and tried to use in navigation component it crashed.
Here is the xml of my bottomAppBar:
My question is how would I able to use navigation component for the Items (Favourites, IDD Voice)?.
I used this.
favouritesFab.setOnClickListener {
navController.navigate(R.id.action_homeFragment_to_balanceAndRechargeFragment)
}
It's working if i'm only in the "Home", then if I navigate to a different menu it will crashed, also if I am in different menu ex:("Usage" or "Accounts") and tried to clicked the "Favourites" it will also crashed and the result will be this.
java.lang.IllegalArgumentException: Navigation action/destination org.multisys.dst.stg:id/action_homeFragment_to_balanceAndRechargeFragment cannot be found from the current destination Destination(org.multisys.dst.stg:id/linkedAccountListsFragment) label=linked_accounts_list_fragment class=org.multisys.dst.ui.linkedaccounts.ui.LinkedAccountListsFragment
How can I use the items in the FAB to navigate like the menus using navigation component?
Thank you.