Skip to main content

All Questions

0 votes
1 answer
44 views

Setting up bottom nav view with navController causes view model cleared when back pressed

My current version of navigation is: implementation("androidx.navigation:navigation-fragment-ktx:2.8.0") implementation("androidx.navigation:navigation-ui-ktx:2.8.0") ...
mohammad fakhraee's user avatar
3 votes
2 answers
1k views

Navigation from a destination to another destination in another navigation graph in Android Kotlin

I'm new at navigation graph and I have a simple movie application that contains a BottomNavigationView with 2 tabs or 2 icons , the first icon or first tab contains 2 Fragments the first one is ...
Ahmed Elsayed's user avatar
2 votes
0 answers
173 views

Fragment Animation (Enter/Exit transition) in Navigation Component with Bottom Navigation View reloads when Tabs switched

I have a Bottom Navigation View with 5 Tabs and each tab has its own NavGraph. Lets assume I'm navigation with Tab1 through Fragment1 -> Fragment2 -> Fragment3 There is custom enter/exit ...
Aftab Sohail's user avatar
0 votes
1 answer
92 views

Android Studio Navigation- bottom menu does not work

I am using the following in android studio View binding Navigation The bottom menu when clicked the app does not go to new destination Here is the code: App level build.gradle file: buildscript { ...
Nazir's user avatar
  • 223
1 vote
0 answers
295 views

bottom navigation view fragment re-created when selected tab

In my application i am using Jetpack Navigation with BottomNavigationView. I have like 5 fragments and when i am in Home fragment, i click tab2 item in bottom navigation view and i click tab1 again, ...
Yothin Homjan's user avatar
6 votes
0 answers
808 views

Android jetpack navigation does not work after adding multiple back stack support [2.4.+]

I updated the navigation library from 2.3.5 to 2.4.2. After update I started getting this error: java.lang.IllegalArgumentException: No destination with ID XXX is on the NavController's back stack. ...
Milan Jiříček's user avatar
1 vote
0 answers
293 views

Android app crashing after migrating to Jetpack View Binding (Using BottomNavigationView with Navigation Component)

I am migrating an Android app from Kotlin synthetic to Jetpack ViewBinding. App is having a Bottom Navigation View with Navigation graph setup. But when I try to navigate from the underlying fragment ...
Bipin Vayalu's user avatar
  • 3,145
0 votes
1 answer
381 views

How to use BottomNavigationView and Jetpack Navigation with Fragments and do not destroy fragment view's

In my app's main activity, I have BottomNavigationView with four items/tabs. Each tab has its own fragment. I use Jetpack Navigation components to navigate between these fragments. When I navigate to ...
devha's user avatar
  • 3,357
2 votes
2 answers
4k views

jetpack navigation -> multiple back stack with bottom navigation not working when back stack is cleared

Starting with version 2.4.0-alpha01, the NavigationUI helpers support multiple back stacks without any code change. If your app uses the setupWithNavController() methods for BottomNavigationView or ...
kostik's user avatar
  • 695
2 votes
2 answers
3k views

Navigation component with bottom nav bar not working

I'm trying to set up a navigation component with the bottom navbar. it is being set since I'm getting the fragment that has been set as home as the fragment. However it's not changing on pressing the ...
Narendra_Nath's user avatar
0 votes
1 answer
971 views

BottomNavigation Menu with Jetpack Navigation does not navigate

I have a strange problem regarding a BottomNavigationBar which I could not solve altough having spent a huge amount of time into it. When I use it in the 'recommended' way (from many tutorials) it ...
VanessaF's user avatar
  • 793
1 vote
0 answers
15 views

Is it possible to use the same graph for two activities with Navigation Jetpack?

I want to migrate my app in order to use a Navigation Jetpack component. I have a bottom navigation with 4 items. Each item is an activity. Could I use the same graph to share it between these ...
PMonroy's user avatar
  • 11
0 votes
1 answer
327 views

Android jetpack navigation: navigate from activity(splashscreen) to activity

I'm developing an app still in its early stages. I'm learning jetpack navigation as it goes. In short, I need to create a splashscreen, it would do its stuff (initializing etc..) then navigate to the ...
jack_the_beast's user avatar
2 votes
0 answers
61 views

BottomNavigationView with NavigationUI and multiple fragments will re-creation

When i change BottomNavigation tab , the fragment will be re-creation. How to cache the created fragment and not re-creation? @Override public void onViewCreated(@NonNull View view, @Nullable ...
zhiguoBao's user avatar
0 votes
1 answer
586 views

Bottom Navigation Behaviour with fragments and Jetpack Navigation

I have an activity, Dashboard Activity, which has a fragment and a bottom navigation menu which is setup like this in DashboardActivity.kt: setContentView(R.layout.activity_dashboard) val navView: ...
RuD's user avatar
  • 113

15 30 50 per page