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
0 answers

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 navigation component. The case where it works when I…
0
votes
1 answer

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 for me lies here.   From Home fragment the app…
0
votes
0 answers

Separate Back Stack for each tab in Android Navigation Component

I'm creating a shopping application using Navigation Component(NavHost with BottomNavigationView) The app has two tabs(Tab Home & Tab Categories). From Tab Home, the user can select a product and see the product detail and from Tab Categories, the…
0
votes
0 answers

How to 'configure' navigation with Android Navigation Component to have different behaviour between back and up?

I have two destinations A (Master) and B (Detail). I have the following actions: A to B B to B (next item) This works fine, but it's the up and back behaviour I'm just not getting right. When I get from A to B and I press either back or up I go…
0
votes
0 answers

Go back to previous fragment gives empty container

I am developing a android app with a menu bar, I have the mainactivity, this has a menu bar and a fragment navigation inside the container. When the app launches it auto sets a fragment in the main_container
0
votes
2 answers

How to determine back button press

I am using android navigation components library. I have two fragments set up with navigation graph. I want to do some additional actions on back button press inside of my fragment. override fun onOptionsItemSelected(item: MenuItem): Boolean { …
0
votes
0 answers

BottomNavigationView with NavController reusable fragments with back stack

I'm trying to implement this solution using Google Jetpack Navigation component and still struggle with back stack issue. The problem I'm facing is a custom implementation of navigating method in FragmentNavigator class breaks existing logic of back…
0
votes
2 answers

How to make a destination navigable from multiple different destinations?

Say I have a screen which is used a few times in the navigation graph. Like the following: There are two tabs in the bottom navigation bar: items and favorites. The items destination displays a list of items. The favorites destination displays the…
0
votes
2 answers

Android Navigation Component: java.lang.IllegalStateException: unknown destination during restore

I'm using Android's AAC Navigation Component and have implemented conditional navigation for my login flow as described in this post: Navigation Architecture Component - Login screen Now everything appears to be working, however after being…
0
votes
1 answer

Using Jetpack's Navigation between screens with different toolbars

I want to migrate my multiple activities app to single activity/multiple fragments architecture and implement Jetpack's Navigation component, but I ran into a problem. I have several activities with a visually identical toolbar, Some have different…
0
votes
1 answer

Hamburger icon not working for Navigation Architecture Components

So I have used the navigation architecture components with java although I followed the codelabds that use kotlin. My code is working but I have detected a few issues: 1. The hamburger icon is visible but does not work. Sliding the screen from the…
Beast77
  • 193
  • 1
  • 17
0
votes
1 answer

Implement navigation with the Navigation components

In the new android studio version there is a new big change. I read the documentation about "Implement navigation with the Navigation components" but can somebody explain to me which is the main difference between this method and the classic one?
0
votes
0 answers

navigation component and view model communication

I'm currently using the new navigation component and sticking to the one activity principle, I'm communicating between my fragments using viewmodels, I currently have a scenario where to tie the view model to the fragment (don't want it tied to the…
0
votes
1 answer

Navigation drawer not displaying up icon when opened

Using architecture navigation component I am able to link my toolbar to the navigation drawer using this code: val appbarConfiguration = AppBarConfiguration(setOf(R.id.landing_dest), drawer_root) toolbar.setupWithNavController(navController,…
0
votes
1 answer

How to change AppBarLayout content based on Navigation library destination

I need to change my AppBarLayout based on Navigation component destination for example I have FragmentA and FragmentB I want when user go to FragmentA add TabLayout to AppBarLayout like YouTube application I have tried to add TabLayout to the…