jetpack-compose-navigation Questions

3

I have a simple Jetpack Compose application that uses the Navigation Component. My UI is comprised of the following composables (redacted UI to be concise): NavHost: @Composable fun NavHost( nav...

3

I have a Composable which needs to fetch some data from my local Room Database when called. When I navigate to another Composable and then navigate back it should fetch the data again. I fetch the ...

8

Solved

I am trying to apply Jetpack Compose navigation into my application. My Screens: Login/Register screens and Bottom navbar screens(call, chat, settings). I already found out that the best way to do ...

1

According to the Android Developer docs it is possible to implement custom animations for the predictive back gesture. I got it to work on an example similar to the one they present in their docs w...

1

Let's assume I have a multimodule Jetpack Compose project with feature modules and I want to scope some object instances to features lifecycles. For example, I want to scope AuthRepo instance to Au...

2

Solved

While testing my app I realized that if a user pressed the FloatingActionButton quickly, several times, the onClick call back could be fired multiple times. In my case, this caused the backstack be...

2

Solved

My app has a main screen with a Scaffold and a BottomNavigation bar: override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { val navController = rem...

10

Solved

I'm using compose-navigation(alpha09) to handle the navigation between composables I want to remove the Splash screen when moving to the next destination (I don't want the back pressed to get back ...

1

I have setup a Bottom Bar in project on Jetpack Compose app with 2 destinations. I have tried to follow the samples from Google. So for example it looks something like this: @Composable fun Example...

1

I have a filter dialog that shows filter options : When I click on "Parent Platform" section I'm navigating to the PlatformsScreen with two arguments. Argument one is parent which is int...

0

So I was trying to use androidx.lifecycle:lifecycle-runtime-compose to implement onStart/onStop events for my Composable screens: In MainScreen I have: LifecycleStartEffect(Unit) { Timber.d("...

2

Solved

I found out that the composable screens are getting recomposition multiple times during navigation from Navhost compose the following example shows how I'm integrating the navigation with logs to i...

2

Is it possible to pre-populate the navigation backstack in Android/Jetpack Compose? I have a deeplink, that navigates deep into the navigation hierarchy, however, on back press, it navigates to the...

7

Solved

I recently started working with Jetpack Compose. I've got the following composable: @Composable fun SearchScreen(navController: NavHostController) { Scaffold( topBar = { SearchBar() }, content =...

7

Solved

From the documentation, I can pass string, integer etc. But how can I pass objects on navigation? Note: If I set the argument type parcelable then the app crashes with java.lang.UnsupportedOperatio...
Houseless asked 16/4, 2021 at 8:7

4

Solved

Consider this example. For authentication, we'll be using 2 screens - one screen to enter phone number and the other to enter OTP. Both these screens were made in Jetpack Compose and the for the Na...

2

So i have an app in compose that has startDestination set as a screen with scaffold with bottom nav bar having 3 items and top app bar, i am able to navigate through the 3 bottom navigation tabs. B...

1

Solved

I want to navigate from a notification action button to a specific screen in my single activity application in compose. Based on this documentation I decided to use deep-link navigation. The proble...
Dabbs asked 13/7, 2023 at 8:42

1

My app has the following structure and because Route B has a own bottom navigation bar and thus an own NavHost, how can I navigate from Screen C (opened from the tab bar) to Route A? - Nested Rout...

2

I am using Jetpack Compose ui version 1.3.0-beta08 and navigation compose version 2.4.0-alpha02 and working Bloom app with all new Architecture components. After login success I need to clear all p...

0

So I had such UI structure at app top level composable (Scaffold to add bottom bar) Scaffold( contentWindowInsets = WindowInsets(0, 0, 0, 0), bottomBar = { if (appState.shouldShowBottomBarAndDra...

1

I checked this info https://developer.android.com/jetpack/compose/libraries#hilt-navigation how to inject ViewModel to a compose screen. For now I implemeted like this for my test app: NavHost( na...

4

I have a NavGraph that looks like this: @Composable fun NavGraph ( navController: NavHostController ) { NavHost( navController = navController, startDestination = "Products" ) { com...

0

I'm trying to find a solution for displaying multiple bottom sheets on top of each other to accomodate our UX/Design. Currently been trying with Accompanist and Compose Navigation Reimagined, but t...

3

I have tried all possible way looks like not getting a solution to this. I am using an all compose app with compose screens and using compose navigation to navigate between this screen, I have a sc...
Congregational asked 3/8, 2022 at 11:35

© 2022 - 2024 — McMap. All rights reserved.