Questions tagged [android-architecture-navigation]

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

The Navigation Architecture Component is released as a part of Android JetPack and AndroidX package. It simplifies the navigation implementation in Android Apps. Its goal is to provide consistent and predictable experience to the end users, with single Activity Architecture. It also has support for Fragments and Deep-links. It has Navigation graph at the core of the library. Navigation Graph describes how the activities and fragments are related to each other and how the transition will work.

1346 questions
0
votes
1 answer

Android JetPack Navigation : How to open a fragment from an activity not associated with it?

scenario : MainActivity.kt : activity_main.xml contains my_nav_host_fragment in mobile_navigation.xml first_frag_dest is the startDestination and there is second_frag_dest also, with respective classes FirstFragment.kt and SecondFragment.kt. I have…
0
votes
1 answer

Navigation Architecture Component causing Fragment A to disappear when Fragment B is entering

I am trying to implement the below fragment transition using navigation architecture component. This animation works perfectly when the fragment is launched with fragment manager. But with navigation architecture component, the fragment A disappears…
0
votes
1 answer

Android navigation framework still shows back arrow even when previous fragment called popUpTo the root

When using the Android navigation framework I have IntroFragment as the root and MainFragment as a destination from IntroFragment. In IntroFragment I…
0
votes
1 answer

Navigation Architecture Component cache webview content

I make navigation in my app via Navigation Architecture Component https://developer.android.com/topic/libraries/architecture/navigation/ I have one MainActivity and switching fragments inside it. public class MainActivity extends AppCompatActivity…
igor_rb
  • 1,821
  • 1
  • 19
  • 34
0
votes
1 answer

android architecture navigation OnNavigatedListener with backstack

I would like to use NavController.OnNavigatedListener to log destinations changing events. The problem is that when some fragment is saved in backstack than for every navigation change is onNavigated called ones more and destination is that fragment…
0
votes
1 answer

Nav Component immediately invoked navigate to destination causes a bug

Navigating in onCreate method like so: override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.magic_mile_host) setSupportActionBar(toolbar_start_test) …
TMaszko
  • 13
  • 3
0
votes
0 answers

Exception Inflating on Navigation View using RecyclerView, Fragment, and Activity with Kotlin

I have a program that will show some data to a fragment with a recyclerview and using json file for the data, i have tried this before and it's working properly, but when i use a bottom navigation, i meet this exception java.lang.RuntimeException:…
0
votes
2 answers

Android Navigation Architecture: crash while on Don't keep Activities option

I'm currently using Android Arch Navigation (1.0.0-alpha06) in one of my projects. But from time to time I'm getting the same crash in my Crashlytics: java.lang.RuntimeException: Unable to start activity ComponentInfo{*.*.*.MainActivity}:…
0
votes
1 answer

DrawerLayout with Navigation Component doesn't get behind a translucent Status Bar

What I want to achieve is the Material Design DrawerLayout getting behind a translucent Status Bar, as such: I am using the new Navigation Architecture Component, which means this is my current structure (I will make it simple since it can have a…
0
votes
1 answer

Navigation Architecture Component - Login Button - createNavigateOnClickListener

I'm using butterknife and fragments. I can't switch to other page in login controls. @OnClick(R.id.btnLogin) public void onBtnLoginClicked() { ... if (AndroidUtils.isInternetAvailable(context)) { ... …
0
votes
1 answer

Android Navigation Architecture Components: Wrong BackStack with NavigationView

I am using the Android Navigation Architecture Components for navigating a Fragment-based-, Single-Activity-application. The main navigation is implemented via NavigationDrawer-pattern: DrawerLayout with NavigationView and NavHostFragment plus and…
0
votes
1 answer

How Can I Build A Login Module Using Navigation(Jetpack) with BottomNavigationView

I Want To Implement A Function Like This: When I Have Logged In, Show This Fragment With "Tab:Me" Logged In Fragment When I Have To Log In, Show This Fragment With "Tab:Me" Not Logged In Fragment Now I Use BottomNavigationView Load Fragment Which In…
0
votes
1 answer

Mockito verify() failing for LiveData postValue

I have created a LoginFragment which navigates to another one when a login is successful using the Navigation Architecture Component. Works fine but the test for it is failing. It is quite a close mirror of the GithubBrowser sample and my test is…
0
votes
1 answer

How to pass Events/Data between Nested Navigation Controllers Fragments

I am planning on a View Hierarchy like this: Basically the Main Fragment will be able to trigger navigations inside the Bottom Sheet Navigation Controller , Bottom Sheet Fragment will also be able to trigger navigations inside the Bottom Sheet…
0
votes
1 answer

android - How to implement navigation with bottom app bar

I have a project with the following 4 layouts: I have actually 1 activity holding a bottom app bar and the NavHostFragment where the fragments get injected. The Main Fragment is the home view. There is a Management and a Setting fragment, both…
1 2 3
89
90