Questions tagged [android-navigation-graph]

303 questions
0
votes
0 answers

Android navigation component exclude fragment from back stack

I need to exclude Fragment from back stack. I know there are many questions here regarding this issue, but I cousin't find an answer to my issue. Let's say I have Fragment A and Fragment B. Fragment A is move to Fragment B and Fragment B open…
Igor Fridman
  • 1,267
  • 1
  • 16
  • 30
0
votes
2 answers

(Android) On switching different tabs in bottom navigation view, fragment set as start destination only shown. The other two are not shown

I have added a bottom navigation view to a layout, which has 3 tabs. On switching the tabs, the fragment added as start destination(in nav graph) is only shown. Rest never shown. I have used navigation graph and menu items for my implementation. I…
0
votes
1 answer

Missing required view with ID, navigation graph android

I have 2 navigation graphs in my app I have 2 fragments with same name but different UI and resides in different package as well. Now I navigate to one fragment it works and while I navigate to other I get the…
0
votes
1 answer

Using nav host fragment and bottom navigation view inside fragment?

I have nav host fragment and bottom navigation view inside home fragment as below
0
votes
1 answer

BottomNavigationView with navhostfragment not showing fragment, android?

I am using navhostfragment in fragment along with bottom navigation view. Below is the xML
0
votes
1 answer

Ho to pass an argument from a fragment that stays in NavGraphA to a start destination fragment of NavGraphB?

I have a FragmentA that stays in NavigationGraphA and a FragmentB that stays in the start destination of NavigationGraphB. How can I pass "isControlled" argument from FragmentA to FragmentB? My code below: NavigationbGraphA.xlm
0
votes
1 answer

MainActivity as Home destination in navigation graph

I have a simple application consisting of one MainActivity and two fragments, FragmentA and FragmentB. I want to use a NavigationGraph such that users still land on MainActivity but then can use two buttons to navigate to either FragmentA or…
0
votes
1 answer

Navgraph direction build fail

I got an build fail when I´m trying to run my application. Thats my error: Class 'ActionGlobalEventHolder' is not abstract and does not implement abstract member public abstract val actionId: Int defined in androidx.navigation.NavDirections Beside…
0
votes
0 answers

How do I expose children destination (Fragment/Dialog) to the Parent Graph of Navigation Component

I've multi-modules setup with Navigation Component with multiple navigation graphs which all have been included in the main app's navigation graph file. But when I try to navigate to one of the children within another module navigation graph this…
0
votes
1 answer

Navigation with abstract base fragment

I have a setup like the navigation graph below. The 3 fragments in the middle are very similar and all extend a BaseFragment class. What I would like to do is to make BaseFragment abstract, so that my navigation graph can be reduced to the figure…
0
votes
1 answer

Can we get same instance of ViewModel inside parent Activity when we use navGraphViewModels?

I have a fragment container view to load more than three fragments, each fragment shared by ViewModel using navGraphViewModels private val viewModel: HomeViewModel by navGraphViewModels(R.id.home_navigation_xml) { defaultViewModelProviderFactory…
0
votes
2 answers

FragmentInstantiationException with Navigation Graph transaction

I am getting below exception while trying to perform transaction through Android Navigation Component(Navigation Graph).However it was working fine with old way of fragent transaction without navigation graph! java.lang.RuntimeException: Unable to…
0
votes
0 answers

NavHostFragment Manager backstack is not proper

I am using navigation architecture component in my application. Suppose I have fragment A as start destination. I have push fragment B and Fragment C via navigation controller. My navigation back stack is A-> B-> C. Then I navigate to Fragment A…
0
votes
1 answer

Android Navigation-Component: Back Button not navigating back to viewpager2

I have a Button in my viewpager2 (Page: UserDataFragment) which navigates the user to another screen (UserDataChangeEmailFragment), where they can change their password etc. The problem I encounter is that the back button on this screen is not…
0
votes
0 answers

Navigate to fragment from bottomsheetdialogfragment

I want to navigate to Profile Fragment, when the user wants to sign up. The LoginBottomSheetFragment is responsible to perform this navigation whenever it pops up from the bottom and user clicks on the button. The problem is that whenever I am…