Questions tagged [navigation-architecture]
35 questions
0
votes
1 answer
How to Navigate any destination for action of header of drawer in navigation architecture
Anyone please explain, How to define the action in Navigation architecture for header layout of drawer.
Now, I need to set click of header of drawer and I set it to like this:
headerOfNavDrawer.setOnClickListener{
//Here I want to navigate to…

Rahul
- 579
- 1
- 8
- 18
0
votes
1 answer
how to call navigation.navigate inside recyclerView item
I have a recyclerView inside a fragment, and when I click an item I want to navigate to next fragment. At the first time I click, it's OK, but after getting back to this fragment and clicking the same item again my application crashes. Could anyone…

Ehsan Haghdoust
- 61
- 1
- 5
0
votes
1 answer
onDestory,onDetach called when opening the fragment
I was developing an app that became quite big in code when I noticed this problem, so I made a test app that contains a bottom navigation bar with main activity and three fragments (F1,F2,F3) and set it up with navigation component. I logged the…

Hadi
- 119
- 10
0
votes
1 answer
Layout in a fragment showing up only on half the screen, but is correct in an activity
I am inflating a layout of the fragment. Its not utilising the whole screen and the layout looks like its shrunk to half the screen. But in the preview screen of Android studio looks perfect.I am using navigation component to traverse to the…

Vivek
- 85
- 8
0
votes
1 answer
Fragment with different size than the nav host fragment
I'm using the navigation architecture component in my single activity app and it works fine but what I'm facing is that in one of the fragments I need to have another fragment that takes about 60% of the initial fragment size (60% of the nav host…

Hadi
- 119
- 10