Questions tagged [android-navhostfragment]
16 questions
2
votes
0 answers
RuntimeException android.os.TransactionTooLargeException
I have a crash in my app that I don't know how to fix. Here is the stack trace:
RuntimeException
android.os.TransactionTooLargeException: data parcel size 527140 bytes
android.app.ActivityClient in activityStopped at line…

Anna Harrison
- 641
- 5
- 13
2
votes
2 answers
Navigation component - Why ViewModel is not re-created even though its owner (Fragment) is being re-created in NavHostFragment?
I am referring to the Bottom Navigation Views Activity template project created by Android Studio.
I notice, whenever I tap on the bottom view to switch from DashboardFragment page, to another fragment page. Then, I tap on the bottom view again to…

Cheok Yan Cheng
- 47,586
- 132
- 466
- 875
2
votes
0 answers
Fragment Animation (Enter/Exit transition) in Navigation Component with Bottom Navigation View reloads when Tabs switched
I have a Bottom Navigation View with 5 Tabs and each tab has its own NavGraph. Lets assume I'm navigation with Tab1 through Fragment1 -> Fragment2 -> Fragment3
There is custom enter/exit transitions to each route (i.e. from Fragment1 -> Fragment2 ->…

Aftab Sohail
- 21
- 1
1
vote
1 answer
Android navigation graph with navviewholder fragment navigation issue when navigating using list click item
I have a very simple use case that I am surprised isn't working.
I have a bottom view navigation controller with 2 fragments, a list fragment and a detailed fragment. When I navigate to the detail fragment page I have no problems navigating…

user1743524
- 655
- 1
- 7
- 14
1
vote
1 answer
I can't find the fragment in the navHostFragment
I have a Patient activity with 3 fragments in a fragmentcontainerview with navgraph and I have Speciality activity that is about a listview of specialities
I want to send and intent from the speciality activity to the first fragment in the main…

Topaholic
- 35
- 4
1
vote
1 answer
BottomSheetDialogFragment click to open another BottomSheetDialogFragment android
I have an ChatRoomActivity with a NavHostFragment. Default fragment is ConversatioFragment which can open a MessageChoicesFragment which is a BottomSheetDialogFragment. There we have 3 choices 1) Copy message 2) Read from 3) Delete message.
If i…

james04
- 1,580
- 2
- 20
- 46
1
vote
0 answers
How to combine drawer layout with viewapger2 and Navhostfragment
I try to combine drawer layout with viewapger2 and Navhostfragment. When I clicked the drawer layout icon, NavigationView (that include my menu and header) is opened. whenever ı try to select one item from drawer layout , ı cant select because…

Mustafa Dogan
- 11
- 4
0
votes
0 answers
Handling Back stack Navigation in Compose
I have a question regarding compose navigation.
I have Activity A which is child to other activity. Activity A has a composable view to set to the content.
Now from A have to navigate to a fragment B for which i use Navhost and add a composable…

hamza khan
- 141
- 1
- 11
0
votes
1 answer
Jetpack Compose + AndroidViewBinding backpress will close the app
I have a navhostfragment inside an AndroidViewBinding in a Composable function. However, when I press the back button on the phone, the app closes. How can I avoid this and just go up in the backstack.
@Composable
fun MyComposeScreen() {
…

Sukitha Udugamasooriya
- 2,268
- 1
- 35
- 56
0
votes
2 answers
Move from child fragment to other child fragment from option menu
Hi have a navigation component with 4 destination, and I add that destination in an option menu.
It works perfectly, but now I need to move from a selected fragment to another one, but I didn't found any solution, because I can open my selected…

Kangel
- 61
- 9
0
votes
0 answers
Navigation from fragment to activity resolves to the current activities graph
I have a navgraph with two activities and multiple fragments within them.
Here is my graph

user1743524
- 655
- 1
- 7
- 14
0
votes
0 answers
Navigate to fragment using navcontroller by sending fragment instance
I want to navigate to a fragment instance using navcontroller but it seems that I cannot add it unless I use the fragment Id or the direction with actions.
So I want to use something as:
val fragment2 =…

htafoya
- 18,261
- 11
- 80
- 104
0
votes
0 answers
Android Kotlin Navhost invisible problem?
When I add the View Host Fragment, the design becomes invisible in the xml section, what can I do?
While navigating in Android Studio, when I add nav host fragment to the xml part, the design side becomes invisible, what can I do?
If you encounter…

Night
- 1
- 2
0
votes
0 answers
why does it say "keeps stopping" when I run the emulator?
[[[[enter image description here](https://i.stack.imgur.com/THp2K.png)](https://i.stack.imgur.com/ubf5E.png)](https://i.stack.imgur.com/6xAta.png)](https://i.stack.imgur.com/dyrx9.png)
When İ "run", there is a problem in the first picture in the…

Ferid Memmedov
- 9
- 1
0
votes
0 answers
how can i go from fragment which is reyclerview to other detail reyclerview fragment
Thanks to Navargs when I click on the list in a home trailer I go to the relevant data in the detail trailer. There are 2 fragments of Reyclerview and adapter. but when I want to go to the detail part, live data is waiting for a model. But I want to…

Baris evik
- 21
- 4