Questions tagged [android-architecture-navigation]

The Navigation Architecture Component provides a framework for in-app navigation for Android apps.

0
votes
0answers
6 views

Overlay Fragment in Andorid Navigation Component

I'm building an app and I'm trying to show a Fragment as an overlay to another fragment, which I know how to do following this qustion. However, I'm using the Android Navigation Component and I'm ...
0
votes
0answers
17 views

Why Dialog does not have a NavController [Missing]?

I am trying to use the latest update of Nav Component in my application where i can add dialog(BottomSheetDialogFragment) in my nav graph nav_version = "2.1.0-alpha05" Part of code from my ...
0
votes
1answer
36 views

Unable to clear the back stack of all fragments with Navigation Components

I am using the Android Navigation Components and am facing one weird issue. I am not able to clear the back stack for the up button, no matter what I tried. My Navigation graph looks like this: Let'...
0
votes
0answers
21 views

Android jetpack navigation component result from dialog

So far I'm successfully able to navigate to dialogs and back using only navigation component. The problem is that, I have to do some stuff in dialog and return result to the fragment where dialog was ...
-3
votes
0answers
17 views

How to fix safeguards error about Direction's class action setter not generated by Android Studio? [on hold]

Setter is not generated in action's name method of direction class for setting arguments value, even after rebuilding projects setter not generated. Is there any solution in kotlin or Java?
1
vote
2answers
29 views

How to use BottomNavigationView with single activity architecture

I am using the navigation architecture component for my project and planned to use Single Activity architecture. So my app flow is as follows: SplashScreen->LoginScreen->HomeScreen SplashScreen, ...
3
votes
0answers
34 views

How to (proper) open Activity/Fragment from Foreground Service using Navigation Components

In my use case, I have a Foreground Service bounded to a Notification. The user can kill the app but the Foreground Service is still alive. Additionally, the user can click in the Notification and ...
0
votes
1answer
35 views

How can I open another activity with specific fragment with Navigation Component?

I am using two Activities. One is MainActivity and the second one is for NFC. MainActivity has nav_graph.xml. After reading the NFC, I'd like to start MainActivity and move to a certain fragment of ...
0
votes
1answer
47 views

OnBackPressedCallback is being called, but app is not going back

I recently updated my dependencies to include the OnBackPressedCallback change from an interface into an abstract class. I have set things up according to the new documentation here but I feel like ...
0
votes
0answers
37 views

Navigating to destination between graphs

The official demo NavigationAdvancedSample) shows a workaround handling multiple stacks. Briefly, it demos 3tabs: Home, Leaderboard, Register, every tab has its own graph. Leaderboard Tab graph has ...
0
votes
1answer
24 views

Android navigation component animate go back from activity to fragment

The animation when I am going from a fragment to an activity is working fine but when I click back it returns without the custom animation I insert. The same if I make the navigation from a fragment ...
1
vote
1answer
60 views

How to fix jetpack navigation pop behaviour incorrect animation?

When using the jetpack navigation host component, I'm having an issue with the navigation "Pop Behaviour" using the a different animation than the one I'd like, and I'm not sure how to force a ...
2
votes
0answers
35 views

How to handle different toolbars between fragments when using Navigation Component

I'm trying to add a collapsing toolbar in a fragment and a normal toolbar in another. How can I accomplish that when using Navigation Components? I've already read some articles saying that each ...
0
votes
0answers
57 views

How to create single activity application with navigation architecture component?

I want to use the new Navigation architecture component to navigate to different screens in my app. As google recommends to have single activity for our app and use multiple fragments. But i have a ...
0
votes
0answers
33 views

Reusing Fragments in Navigation Component

I have have two Activities: MainActivity & LoginActivity. And I have two separate graphs for each Activity. I also have a custom Fragment in which would like to show in both LoginActivity and ...
0
votes
2answers
139 views

Prevent circular navigation logic in BottomNavigationView using Navigation component

I have a BottomNavigationView hooked up to 3 fragments (A, B and C) via the Navigation component. I also have a login fragment, which I am popping off the stack after successful login. Observed ...
1
vote
1answer
44 views

Navigation Lint Error: This navigation graph is not referenced from any layout files

I have 2 modules in my app (app module and splash module). I'm trying to leverage the <include> tag in an effort to make the FTUE self contained and not a part of the main nav graph as the docs ...
1
vote
1answer
89 views

How to navigate from Dialog to Fragment in Navigation Component?

I am trying to navigation from DialogFragment to Fragment in Navigation Component, but getting weird result. When I navigate from DialogFragment to Fragment, background fragment is changing to target ...
0
votes
2answers
37 views

Bottom Navigation View setup with fragment navigation component not working

I tried implementing the bottom navigation view to set up with fragment transition using navigation components by referring Navigation Codelab. The fragments are not changing when clicking on the ...
0
votes
0answers
10 views

Persisting navigation graph positioning in Android Studio navigation editor

Is there a way to persist the position of nodes in the navigation graph when using Android Studio? Maybe even check into version control. I would imagine those positions are written to some file in ....
2
votes
2answers
46 views

Navigation's back stack is lost when navigation is nested

I have a navigation which looks like this Frag1 -> Frag2 -> Frag3 Inside Frag2 there is a NavHostFragment with its own navigation InnerFrag1 -> InnerFrag2 If I do this Navigate to Frag2 ...
2
votes
1answer
50 views

ViewModel refetches data when fragment is recreated

I am using Bottom Navigation with Navigation Architecture Component. When the user navigates from one item to another(via Bottom navigation) and back again view model call repository function to fetch ...
-1
votes
0answers
31 views

NavigationUI side-by-side-fragments

Is there a straightforward way to implement the side-by-side fragment pattern (i.e., a list on the left with details of the selected item on the right) using Android's NavigationUI Architecture ...
0
votes
1answer
29 views

Navigation Architecture Component - DestinationFragmentArgs is not generated

I have this in app gradle: apply plugin: 'androidx.navigation.safeargs' implementation 'android.arch.navigation:navigation-fragment-ktx:1.0.0' implementation 'android.arch.navigation:navigation-ui-...
0
votes
0answers
23 views

AutoCompleteTextView is getting called everytime while going back in Jetpack navigation

MyFragment : onActivityCreated() RxTextView.afterTextChangeEvents(etSearch) .skipInitialValue() .subscribe { viewModel.callApi(etSearch.getText.toString()) ...
3
votes
2answers
140 views

Trouble returning date from DatePickerDialog fragment when using Navigation Controller

I am trying to return a date selected from my DatePickerDialog. I know there are a few questions about this here on SO and I am sure I have checked for those in my code and I still can't get the date ...
0
votes
0answers
29 views

How to remove back button from background fragment when dialog is popped in NavigationComponent?

I am using latest Navigation Component and have some DialogFragment. I use dialog element to specify my DialogFragments in my navigation graph. But when dialog is popped, back fragment showing back ...
0
votes
0answers
71 views

Navigation Component transition animation doesn't work properly

In MainActivity.kt, I have methods to change its Fragment. Here is a method for going to SettingActivity.kt override fun startSetting() { Timber.d("startSetting()") Toast....
0
votes
1answer
36 views

Signup flow with advanced navigation example

I am currently using bottom navigation like in navigation advanced example, I am trying direct user to signup flow if user is not authenticated. I use following code in side defaultly selected ...
0
votes
0answers
15 views

Android - HardwareAcceleration not working with navigation

At first I had two activities. MainActivity and CameraActivity. First one had 2 fragments, the second one had 1 fragment - CameraFragment. CameraActivity had a android:hardwareAccelerated="true" in ...
0
votes
1answer
62 views

Better way to pass data between Fragments Navigation Component?

Passing data between Fragments in Navigation Component is easy. Say going from A to B you just set arguments with SafeArgs and you are done. But, it gets tricky when passing data from B back to A. ...
0
votes
1answer
63 views

Using Android Jetpack Navigation component with Android BottomAppBar

I am trying to implement Jetpack Navigation with the new Android Bottom App Bar in my main activity but it is not working as it should be. I've read the notes on navigation and doesn't seem to find ...
0
votes
1answer
34 views

What is the difference between enterAnim & popEnterAnim & exitAnim & popExitAnim?

What is the difference between animation tags in latest Navigation Architecture Component? I got confused with enterAnim & popEnterAnim. Similarly, exitAnim & popExitAnim. Any visual ...
0
votes
0answers
40 views

How to listen to Fragment Change in Navigation Component?

How can I add Fragment Change Listener in new Navigation Component? I have a BottomNavigationView in which I used new Navigation Component following official sample I have four destinations in my ...
1
vote
2answers
48 views

How to perform custom navigation?

I try to using new architecture component called navigation. It's very thrilling and make lesser code than using FragmentManager. Now, I ended up in a case where I have 5 fragments with navigation ...
0
votes
0answers
14 views

Android Navigation Architecture Component : TabsLayout [duplicate]

Is it possible to integrate tab-layout with Navigation similar to bottom navigation view and options menu. For a selected menu item, NavigationUI.onNavDestinationSelected() is called to navigate to ...
1
vote
1answer
61 views

Implementing Android Jetpack Navigation component with the new Android BottomAppBar

I am trying to implement Jetpack Navigation with the new Android Bottom App Bar in my main activity but it is not working as it should be. I've read the notes on navigation and doesn't seem to find ...
0
votes
0answers
26 views

why it takes too long to show a fragment that has constraint layout inside a scroll view

I have 3 fragments that has constraint layout inside the scroll view. and all of them takes around 1 - 2 seconds to show the fragment to the screen, it makes app seems laggy. I am sure that there is ...
2
votes
1answer
124 views

Pass data back to previous fragment using Android Navigation

I've started using Android Architecture Components (Navigation and Safe Args, View Models) along with Koin library. Currently, I've got a problem with passing arguments between two fragments - I need ...
0
votes
0answers
31 views

Jetpack navigation force show back arrow

I would like to know if it is possible to force a back arrow to show. Here's my use case: main module with a list detail screen (dynamic feature module) Now in this details screen, I would like to ...
0
votes
0answers
22 views

Reset to start destination when change tab

Using gogole code sample of Advance Navigation here https://github.com/googlesamples/android-architecture-components/tree/master/NavigationAdvancedSample it is all good, but now i need a case where ...
0
votes
1answer
24 views

How to fix (error: cannot find symbol class ActionOnlyNavDirections) with navigation architecture in andoid studio

I'm using navigation architecture component in android studio. I used it with the bottom app bar and it worked perfectly but whenever I try to add an action I get this error while launching the app (...
0
votes
1answer
44 views

Navigation component with viewpager performance issues

My situation is the following: I have a HomeFragment which contains a ViewPager that has 3 Fragments (one of those has a child Fragment aswell). When I now navigate away from the HomeFragment and try ...
0
votes
0answers
47 views

Shared element transition from fragment to recyclerview

I have on question. I am being trying to implement shared element transition from fragment to recycler view or from recycler view to recycler view it but it's not working. I am using Jetpack ...
0
votes
2answers
95 views

Handle onBackPressed in Android Navigation Component

I have implemented navigation Drawer with Navigation Components in Android. I have 5 fragments that I want to go back to my HomeFragment when I click on back pressed. For the moment they stay ...
1
vote
0answers
52 views

Jetpack Navigation Component Back Stack

I'm using Jetpack Navigation Component with BottomNavigationView in my app. The application is something looks like this image: The app has 4 destinations: Home Categories Account Search(I open it ...
0
votes
2answers
51 views

Question about android navigation architecture component

I have a question. I'm using android navigation architecture components, using bottom navigation view with singl activity. How can I make a fragment open only once? Even if the button that causes this ...
1
vote
2answers
93 views

Trouble showing datepicker dialog fragment using Navigation component

I am trying to use the Navigation Component to show a date picker dialog fragment. I am getting the following error: android.view.WindowManager$BadTokenException: Unable to add window -- token ...
0
votes
1answer
27 views

Home icon press in Navigation component bottom navigation

I have integrated Navigation component in my app. I'm using it along with Bottom Navigation. I have 3 tabs [Home, Notification, Account]. Switching the navigation is working perfectly fine. Problem ...
1
vote
2answers
77 views

Android navigation component: how save fragment state

I use bottomNavigationView and navigation component. Please tell me how I don't destroy the fragment after switching to another tab and return to the old one? For example I have three tabs - A, B, C. ...