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

Androidx Navigation IllegalStateException after onSaveInstanceState

I have an app using AndroidX's Navigation library, but I'm getting odd behavior. Particularly around my app going in/out of the background. Here are two examples: In a simple on click listener in a Fragment I…
TheHebrewHammer
  • 3,018
  • 3
  • 28
  • 45
0
votes
1 answer

Is there an equivalent to commitAllowingStateLoss to Navigation Architecture Components?

I'm migrating my code to the new Nav libraries, but I want some equivalent to commitAllowingStateLoss like there is in FragmentTransaction. Any tips? Thanks in advance!
0
votes
2 answers

Unable to install Navigation in android

I am trying to install the latest release Navigation in Architecture components . i am following this document Tutorial link When i am trying to sync it is giving error . Could not find…
-1
votes
2 answers

Android Component Navigation how do i prevent the map page from refreshing on every click

this is my design I am planning a 3 page map application. I have a map on my first page. bottom navigation reloads my map every time it is clicked. how can i prevent this? My NavGraph I cannot do this with transaction because there are too many…
-1
votes
1 answer

How to use navigation component with VIPER architecture?

I'm trying to learn how to use VIPER with android from this tutorial https://www.raywenderlich.com/5192-android-viper-tutorial but in the end of tutorial it said it's hard to implement the router layer which a core layer of the architecture .. is…
user15587401
-1
votes
1 answer

Back button not working when using Navigation architecture component

I have the following Activity: import androidx.appcompat.app.AppCompatActivity import android.os.Bundle class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) …
-1
votes
1 answer

Prevent DialogFragment from being dismissed when the free area is touched

By default, when a DialogFragment is shown, there's a large, unoccupied area that's shown with a semitransparent overlay. When the user touches this, the DialogFragment is dismissed. How can I prevent this behaviour? Note that I still want the user…
-1
votes
1 answer

Android data binding makes fragment display full screen, breaks navigation

I have a single activity app with bottom navigation tabs using Android Architecture Navigation Component. Here is the code for one of the fragments: public class ProfileFragment extends BaseFragment { private final int layout =…
-1
votes
1 answer

Where to add toolbar and navigation bar

I'm using android navigation controller. My main activity hosts a nav fragment but where should other components like toolbars and nav bottom bar go, in the main activity or child fragments? activity_main.xml
-3
votes
1 answer

How to avoid fragment recreation using navigation architecture component?

I have 4 fragments in a drawer, lets call them fragment A, B, C, D. I use navigation architecture to bind my fragments with the drawer. Fragment A is my entry point and from there I can navigate anywhere on the drawer. Suppose I take the path A > B…
1 2 3
89
90