22 questions
0
votes
1
answer
145
views
Compose Navigation how to check current navigation's route and match it with data class/object?
@Serializable
data object HomeRoute
composable<HomeRoute> { entry ->
HomeRoute(...)
}
val currentBackStackEntry = navController.currentBackStackEntryAsState()
val route = ...
1
vote
1
answer
31
views
How to check if the current route has a parent interface using type-safe navigation in Jetpack Compose?
My routes are defined like this:
@Serializable
sealed interface Routes {
@Serializable
sealed interface TopLevel: Routes {
@Serializable
data object Home : TopLevel
@...
1
vote
1
answer
149
views
Jetpack Compose Navigation: Preventing the Brief Appearance of the Bottom System Bar When Transitioning to a Dialog
First, my app follows a single-activity architecture, and the activity code is as follows:
@AndroidEntryPoint
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: ...
1
vote
2
answers
249
views
Android Studio: Jetpack Compose navigation skipping pages when quickly navigating back and forth
While running the following app:
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge(...
0
votes
0
answers
51
views
Why does the text disappear when navigating to Profile screen using launchSingleTop = true but persist when using the back button?
I'm facing an issue when navigating to a Profile screen that contains a TextField with rememberSaveable.
Here's the behavior:
When I navigate to the Profile screen via the Bottom Navigation Bar (using ...
1
vote
1
answer
321
views
Why am I getting duplicate activity instances when I click on a deeplink
I have a very simple single activity compose app utilising compose navigation:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android....
2
votes
0
answers
85
views
Creating a compose navigation scoped Repository?
I'm building an Android app with Kotlin, Jetpack Compose, and Hilt for dependency injection. My app has a KYC flow that spans about 10 screens(has own navigation graph of this flow), each with its own ...
5
votes
1
answer
113
views
Hilt Navigation Compose and ViewModel
I tried to follow the examples in the android documentation but I can't implement the navigation using Navigation Compose, ViewModel and Hilt. No errors are thrown and in the NavigationScreen ...
1
vote
2
answers
553
views
navigation back causes a white screen overlay on previous destination in jetpack compose
A white screen or an unknown background sometimes appears when I press the back icon, which triggers { navController.navigateUp() }. This behavior does not occur consistently but happens randomly, and ...
1
vote
1
answer
65
views
Pass Nav Augments to enter Transition arguments in android compose navigation
I’ve got a Navigation compose that passes arguments to the start animation, specifically the scaleIn and scaleOut properties. However, the offSetX and offSetY values are null.
But here’s the catch: ...
1
vote
0
answers
179
views
How to set a destination in NavBuilder.navigation as startDestination with Jetpack Compose type safe navigation?
Is it possible set start destination of a NavGraph to a destination in NavGraphBuilder.navigation(){}?
private fun NavGraphBuilder.addNavGraph(navController: NavController) {
composable<RouteA&...
1
vote
0
answers
98
views
Dynamically setting graph with type safe Jetpack Compose Navigation
Does navController.setGraph() work in Jetpack Compose type safe navigation?
Calling setGraph sets graph but since NavHost sets navController.graph in either overloads it goes back to initial NavGraph ...
1
vote
0
answers
218
views
Is it possible to deep link in jetpack compose navigation using relative urls?
I would like to be able to declare deep links in my compose nav graph with relative urls. There are a couple of reasons for this, firstly it's not unreasonable for an app to declare multiple schemes/...
2
votes
0
answers
123
views
How to run a function when navController.popBackStack() is called in Jetpack Compose?
I have a list of "clients" which are presented using a lazy column on a screen. I am able to enter each client (navigate to another screen) and edit the information of this client, but when ...
3
votes
1
answer
1k
views
Jetpack Compose popBackStack problems with animated navigation transitions
When using new Compose navigation that incorporates animations in NavHost by default, i encountered a few issues with navController.popBackStack(). (Edit 2: nav version 2.8.0-beta03)
2 main issues ...