Category : android-navigation

I have multiple navigation graphs for multiple activities but I always have problem with navigating to fragments by navController. It always return such errors cannot be found from the current destination Destination java.lang.IllegalArgumentException: Navigation action/destination com.my.app:id/action_orderDetailFragment_to_driverMapFragment cannot be found from the current destination Destination(com.my.app:id/driverMapFragment) label=fragment_driver_map class=com.my.app.orders.DriverMapFragment I’ve tried various amount of solutions from safeargs by ..

Read more

My application has a navigation drawer. From drawer options, I am opening different activities. At that time a blank screen is displayed before the new Activity. @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { case R.id.nav_message: Intent newAct = new Intent(getApplicationContext(), FeedbackActivity.class); startActivity(newAct); break; } drawer.closeDrawer(Gravity.RIGHT); return true; } As per some investigations, ..

Read more

I have very simple navigation and when I attempt to go to new fragment I get this error: java.lang.IllegalArgumentException: Navigation action/destination com.my.app:id/action_settingsFragment_to_profileFragment cannot be found from the current destination Destination(com.my.app:id/mainFragment) label=fragment_main class=com.my.app.main.MainFragment navigation <fragment android:id="@+id/settingsFragment" android:name="irando.co.id.laundryku.laundrykucustomer.main.SettingsFragment" android:label="fragment_settings" tools:layout="@layout/fragment_settings" > <action android:id="@+id/action_settingsFragment_to_profileFragment" app:destination="@id/profileFragment" app:popEnterAnim="@anim/slide_in_left" app:popExitAnim="@anim/slide_out_right" app:enterAnim="@anim/slide_in_right" app:exitAnim="@anim/slide_out_left" /> </fragment> <fragment android:id="@+id/profileFragment" android:name="irando.co.id.laundryku.laundrykucustomer.main.ProfileFragment" android:label="fragment_profile" tools:layout="@layout/fragment_profile" > </fragment> ..

Read more

I created an implicit deeplink within a navigation graph. The project contains multiple activities, so it’s not all just one activity and a navigation graph. The navigation graph is contained in a separate activity. I start it by passing the Uri to it, using Intent.setData(), and then when it starts, I handle it the following ..

Read more

I am creating a simple project and I am using the navigation component. Here is what I am trying to achieve. I have a navigation graph and single activity that has FragmentContainerView that acts as NavHostFragment and NavigationView that displays the navigation drawer menu. From this activity, using the drawer menu item and navigation graph, ..

Read more

I have 2 fragments, FragmentA contains a list of starwar characters whereas FragmentB contains details of that character. I am using viewModelScope.launch in my fragments to fetch details for a character. Below is my ViewModel @HiltViewModel class DetailsViewModel @Inject constructor( private val getSpecieDetailsUseCase: GetSpecieDetailsUseCase, private val getFilmDetailsUseCase: GetFilmDetailsUseCase, private val getPlanetDetailsUseCase: GetPlanetDetailsUseCase, private val mapper: ..

Read more

Get next error: Non-fatal Exception: java.lang.IllegalArgumentException: Navigation action/destination com.sai.mand:id/bottom_menu_dialog cannot be found from the current destination a(com.sai.mand:id/bottomMenuDialog) label=BottomMenuDialog at androidx.navigation.NavController.navigate(NavController.java:931) at androidx.navigation.NavController.navigate(NavController.java:868) at androidx.navigation.NavController.navigate(NavController.java:854) at com.sai.mand.tools.NavigationHelperKt.startMailApp(NavigationHelperKt.java:131) at com.sai.mand.features.authorizations.list.AuthorizationsListFragment$setupViewModel$5.onChanged(AuthorizationsListFragment.java:144) at com.sai.mand.features.authorizations.list.AuthorizationsListFragment$setupViewModel$5.onChanged(AuthorizationsListFragment.java:51) at androidx.lifecycle.LiveData.considerNotify(LiveData.java:131) at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:149) at androidx.lifecycle.LiveData.setValue(LiveData.java:307) at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50) at androidx.lifecycle.LiveData$1.run(LiveData.java:91) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7050) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965) But ..

Read more

I created project from sample "Navigation drawer activity". Navigation icon works fine for top level and other destination. Navigation icon morphs from "hamburger" to "arrow" and back. Issue Ok. Now I need to implement full-screen dialog as it recommended for dialogs with keyboard input. I created dialog fragment destination according documentation: ProductCountChangeFragment.kt internal class ProductCountChangeFragment ..

Read more