jetpack-compose-navigation Questions
3
From the docs, I see you can nest navigation graphs like so:
NavHost(navController, startDestination = "home") {
...
// Navigating to the graph via its route ('login') automatically
//...
Padraic asked 23/11, 2021 at 18:32
4
I am trying to navigate lets say from onboarding to dashboard and beyond and pop the onboarding once user hits dashboard, but still with 'back action' I end up on onboarding again.
Here is the samp...
Landrum asked 28/7, 2021 at 13:4
1
Solved
My app uses hilt and I have some work with LoadManager inside my activity that read contacts using ContentResolver and when I finish work I get the cursor that I send to my viewModel in order to pr...
Seafaring asked 27/11, 2022 at 21:37
1
In Android I often want to navigate is response to state change from a ViewModel. (for example, successful authentication triggers navigation to the user's home screen.)
Is the best practice to tri...
Vedetta asked 10/11, 2022 at 14:31
0
I come across requirement where I have to do certain task when user is coming via back navigation flow.
Suppose : Currently user is on A Screen and on button click it got navigated to B Screen.
On ...
Eleni asked 3/11, 2022 at 12:29
1
Solved
Here is the code that causes the infinite recomposition problem
MainActivity
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(saved...
Isoleucine asked 27/10, 2022 at 11:46
1
Solved
I am trying to implement Navigation using single activity and
multiple Composable Screens.
This is my NavHost:
@Composable
@ExperimentalFoundationApi
fun MyNavHost(
modifier: Modifier = Modifier,
...
Dexamyl asked 23/10, 2022 at 20:41
2
Solved
I am trying to build below navigation for my order management app:
manage_orders/manage_orders/{locationId}
manage_orders/manage_order_details/{orderId}
And here is my navigation code for that:
in...
Offside asked 3/9, 2021 at 1:52
1
Solved
I'm trying to get the code from GitHub Oauth API playground://gh?code=XYZ in the ViewModel through savedStateHandler. My composable screen configuration:
NavGraphBuilder.composable(
route = "...
Lumberyard asked 2/6, 2022 at 20:16
2
During navigation from Navhost, I found out that the composable screens are getting recomposition multiple times. Because of it, my ViewModel is calling API data source multiple times too.
@Composa...
androidandroid-jetpack-composeandroid-jetpack-navigationjetpack-compose-navigationcompose-recomposition
Chug asked 1/4, 2022 at 17:54
1
Solved
My goal is to to have a LoginScreen from which I can navigate to an InternalScreen. The InternalScreen should have/be a bottom navigation bar that can navigate to multiple other screens/routes in t...
Minutia asked 25/2, 2022 at 16:15
1
Solved
I am having this issue where I have to navigate when given state gets updated after an asynchronous task gets executed. I am doing it like this:
At ViewModel.kt
fun executeRandomTask() {
viewModel...
Harelip asked 1/4, 2022 at 15:59
1
Solved
When using Jetpack Compose navigation, would one use one ViewModel for all screens or one ViewModel for each screen? Is there any architecture guidance on this? And if one would use multiple ViewMo...
Penhall asked 26/3, 2022 at 16:40
1
Solved
Is it possible to set the value of a FloatingActionButton's onClick inside of a Scaffold from a screen composable from a NavHost, which is also inside the Scaffold? Here in my example, I want to be...
Tatting asked 19/2, 2022 at 15:58
1
Solved
I want to use outlined and filled icons based on selected state in NavigationBar just like google maps app, using jetpack compose. In case of xml we use selector so what do we use for compose ?
Her...
androidandroid-jetpack-composematerial-components-androidjetpack-compose-navigationandroid-jetpack-compose-scaffold
Villein asked 24/1, 2022 at 8:41
0
As far as I know, before jetpack-compose, It was good practice to have one single activity and then use multiple fragments for your app.
But now jetpack compose offers navigation between jetp...
Magdamagdaia asked 19/9, 2021 at 21:29
0
I checked out answers here and here to pass an Object from one composable to another and passing an @Serializable object as String from one composable to another but get the resulting error
java.l...
Ormiston asked 14/9, 2021 at 11:12
1
Solved
I am trying to set up the navigation back button following this SO thread, but can't make it work.
@ExperimentalFoundationApi
@Composable
fun LazyVerticalGridActivityScreen() {
val navController =...
Sheathbill asked 8/8, 2021 at 12:40
1
Solved
I was trying to implement jetpack compose bottomnavbar. But I encountered this problem. Whenever label don't get enough space it's overlapping the icon. Am I missing something? Is there any solutio...
Parrotfish asked 17/6, 2021 at 19:30
0
I run into a weird error after upgrading compose to 1.0.0-beta08:
java.lang.IllegalStateException: Check failed.
at androidx.compose.ui.node.OuterMeasurablePlaceable.getLastConstraints-msEJaDk(Out...
Dew asked 12/6, 2021 at 12:53
© 2022 - 2024 — McMap. All rights reserved.