Questions tagged [android-navigation-graph]

303 questions
2
votes
3 answers

Navigation graph open another fragment

I have a simple application where I am trying to open another fragment on click of a button. My navigation graph
2
votes
1 answer

Deep Link using Navigation Component not opening my destination fragment

I'm using Android Navigation UI for navigation in my app. I need to open a web URL (dynamic links) in my second fragment. this is my code in the navigation graph
2
votes
0 answers

Navigation Component exit animation is not work as expected

I am using the Navigation Component to handle navigation inside the Android app and it's working great but recently, I received one requirement in which I have to slide up both fragments UI (entering & exiting) when launching a new fragment. But I…
2
votes
1 answer

How to prevent fragment detached in bottom navigation bar just like the NavigationAdvancedSample?

I have two question from the NavigationAdvancedSample, which is the sample android repository. 1 I found out that title fragment isn't detached while user moved from title fragment to the other fragment such as leaderboad fragment(or register…
2
votes
0 answers

Error: "ID does not reference a View inside this Activity" when updating gradle from appcompat:1.2.0 to appcompat:1.3.1

I updated a component in a gradle file from: implementation 'androidx.appcompat:appcompat:1.2.0' to implementation 'androidx.appcompat:appcompat:1.3.1' and started getting these errors: Error inflating class fragment ID does not reference a View…
lcj
  • 1,355
  • 16
  • 37
2
votes
1 answer

Why can't I get null as an argument when switching screens in navigation?

I use navigation and SafeArgs to switch screens and pass data. When data is selected on screen A, data is transmitted at the same time as screen switching. However, there are times when screen A switches to screen B without any action. I decided to…
2
votes
2 answers

Android Navigation Component with Drawer Layout and Dynamic Menu Items

So, here is what I want. The top level data is structured like below : Section 1 Title -> Section 1 Content (List) Section 2 Title -> Section 2 Content (List) . . . Section N Title -> Section N Content (List) I want to display the section titles in…
2
votes
2 answers

How to slide from bottom animate between destinations using Navigation components?

Here is my code, for slide-in & slide-out animation, how to slide from the bottom animate between destinations using Navigation components?
Bolt UIX
  • 5,988
  • 6
  • 31
  • 58
2
votes
1 answer

How to switch fragment orientation on Navigation Graph in Android Studio

I added two fragments to a Navigation map in Android Studio and they appeared landscape. I would like to switch them to portrait view to save view space. Can some help?
2
votes
0 answers

How to remove glitch when navigating between Fragments with different toolbars?

I am using the Jetpack Navigation Component in an app with Single Activity structure. Since in some Fragments the toolbar needs to be different or not be there at all, I am following Google's suggestions, which basically says not to have the toolbar…
2
votes
1 answer

Navigation graph with multiple top level destinations and back-key behaviors

When I have multiple top level destinations in my navigation graph, and when I click back-key to finish my app, those destinations other than the startDestination won't finish but pop the startDestination Fragment. FragmentA (startDestination) ->…
hata
  • 11,633
  • 6
  • 46
  • 69
2
votes
2 answers

Navigation component SingleTask launching of fragment navigation

I am using Navigation Component to build my application. I would like to implement SingleTask launch mode in the fragment navigation how can I achieve it? For more clarity, I will detail my problem. I have a HomeFragement(Lets Fragment A) and from…
2
votes
1 answer

How to set BottomNavigationView inside Fragment

I have one activity and few fragments. I set up my activity with NavController and navigation graph like this: override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding =…
2
votes
1 answer

How to use navigation component in fragment Android

I want to use Navigation component in my fragment. My XML code like this ... …
2
votes
0 answers

Animate transitions of DialogFragment using Navigation Component

Is animating transitions of DialogFragment supported by Navigation Component? My dialog: