Questions tagged [jetpack-compose-navigation]
200 questions
3
votes
1 answer
Jetpack Compose BottomNavBar label overlapping Icon
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 solution like truncating or shrinking text…

Rafiul
- 1,560
- 7
- 19
2
votes
0 answers
NavHost's composable() function calling itself again on executing navController.navigate() in jetpack compose
here is my simple code :
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
SqueezeMyBrainTheme {
// A surface container using…

D_K
- 152
- 2
- 9
2
votes
1 answer
How to save navigation state between configuration changes?
I have an android compose app that is set up with a single activity that uses NavController to navigate between screens.
However, when I rotate the screen (make a configuration change) the screen resets to the startDestination specified in the…

jojeyh
- 276
- 1
- 3
- 12
2
votes
1 answer
Jetpack Compose Deeplink Conditional navigation
im facing the problem that i do not see any good sample on conditional navigation using jetpack compose. Especial when it comes to Deeplinks where the App supports deeplinks to specific screens based on some preconditions. How do you guys impl.…

Kitesurfer
- 3,438
- 2
- 29
- 47
2
votes
2 answers
How to set title and buttons in TopAppBar of child screens in Android Jetpack Compose
I have an app that is using Top App Bar and bottom navigation.
Each bottom tab has its own navigation with NavHostController.
On my Home tab, I have a NavHostController like so
fun HomeNavHostScreen(
modifier: Modifier = Modifier,
…

Dave Kababyan
- 41
- 4
2
votes
1 answer
Navigation with Arguments with Jetpack Compose
I've been troubleshooting this issue for couple of days now about navigating with args in jetpack compose. I feel like I'm missing something simple, really simple that I can't figure out somehow.
I tried making sure I'm coding it correctly but to no…

Christian L
- 23
- 3
2
votes
0 answers
Jetpack Compose Navigation Deep Link causes duplicate activity
I'm trying to show a notification that when clicked will open ChatScreen. It does open ChatScreen but started as a different activity, so there's 2 MainActivity in the back stack.
I use Compose Destinations, a wrapper library for Compose…

Risal Fajar Amiyardi
- 749
- 6
- 23
2
votes
0 answers
Modularized App and Global State (Android Compose)
I am following the Now In Android sample for modularization and best practices with Jetpack Compose and I am a bit stuck with sharing a simple LocalDate state across several modules/features.
I want to be able to change a selected date in several…

goldensoju
- 606
- 1
- 6
- 14
2
votes
0 answers
How to create and share navGraph scopped ViewModel instance to navigate between UI states in Jetpack Compose in Android?
I have the below navigation graph with Jetpack Compose:
fun NavGraphBuilder.authGraph(navController: NavController) {
navigation(startDestination = "login", route = "auth") {
composable("login") {
val authEntry = remember(it)…

Samuel Robert
- 10,106
- 7
- 39
- 60
2
votes
0 answers
Jetpack Compose Navigation Include start destination screen on navigation stack
I'm recently struggling with some complex logic for deeplink & navigation management with Jetpack Compose Navigation. My actual problem is that when I handle my deeplinks and call navController.navigate(uri) the navigation is working properly but…

Francisco Durdin Garcia
- 12,540
- 9
- 53
- 95
2
votes
1 answer
How to trigger navigation after viewmodel is loaded with Jetpack Compose Navigation
I am creating a simple application using compose, which shows a loading screen while API data is being loaded. The screen shows a progress bar while it loads, then upon loading the data into the view model, it is supposed to navigate forward to the…

user216408
- 25
- 3
2
votes
1 answer
Compose - get the same instance of ViewModel inside and outside of Navigation Graph
The top-level composable in my Compose app is structured like this:
ModalBottomSheetLayout(/*...*/) {
Scaffold(
topBar = {
when (currentScreen) {
/*...*/
}
},
content = {
…

Calamity
- 700
- 7
- 23
2
votes
1 answer
How can Jetpack Compose Navigation remember multiple back stacks?
I'm reading about Navigation in Jetpack Compose, and found this example I don't understand.
From the docs:
By using the saveState and restoreState flags, the state and back stack of that item is correctly saved and restored as you swap between…

Maarten
- 6,894
- 7
- 55
- 90
2
votes
1 answer
How to navigate up from one NavHost to another in Jetpack Compose?
So I have root navigation graph that contains HomeScreen, which is nothing but a Navigation graph itself, with it's own NavHostController, because in HomeScreen I use bottom navigation bar.
This is RootNavGraph
@Composable
fun RootNavigationGraph…

WhichonesPi
- 98
- 6
2
votes
0 answers
Can we able to pass list as an argument for navigation in Jetpack Compose?
Actually, I need to pass 'emptylist' to all screens in navigation, through arguments. But I couldn't find any type called 'ListType' in NavType. How can I pass the list to all screens?
fun Navigation(navController: NavHostController)…

Aswin Gopinathan 2
- 21
- 1