1,225 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Score of 3
2 answers
194 views
How to pass a custom Parcelable object in Jetpack Compose Type-Safe Navigation (Navigation 2.8.0+)?
With the release of Jetpack Compose Navigation 2.8.0, we can now navigate using type-safe objects (@Serializable data classes) instead of route strings. However, if my route data class contains a ...
- reputation score 31
Score of 0
1 answer
91 views
Set an optional argument of IntType in a Route for Androidx Navigation
I'm using Androidx Navigation as a router in my app, whereas I have a bunch of different routes, and one has some arguments of the shape: route?$sectionArg={$sectionArg}&itemId={$itemId}. For ...
- reputation score 2245
Score of 0
1 answer
88 views
Migration from interface callback to ViewModel + LiveData in Navigation Component – how to trigger list initialization before popBackStack?
I’m migrating from an interface-based fragment communication pattern (via Activity) to Navigation Component + shared ViewModel + StateFlow.
Legacy approach (interface callback)
From FilterFragment ...
- reputation score 161
Score of 3
0 answers
144 views
Fragments, Predictive back animation customization
To implement Predictive Back feature in an app, that uses Fragments and Navigation Component, there are 2 options:
Option A: Use Transition API.
Just set animator animations directly into nav_graph ...
- reputation score 51
Score of 0
1 answer
121 views
Android Compose navigation arguments saved unnecessary
While using android navigation compose have a problem with saved navigation arguments.
For example, i have following routes:
@Serializable
object ScreenA
@Serializable
data class ScreenB(val id: Long?...
- reputation score 43
Score of 0
1 answer
82 views
Android: How to change the FragmentManager Backstack when going back (insert a new fragment)?
I'm trying to add a view to the fragment stack, without any visible indication that it happened, so it appears when going back.
Forexample,
3 Fragments, A, B and C
A -> C
Then when going BACK from ...
- reputation score 759
Score of 0
1 answer
78 views
Android Navigation - Is there a better way of changing the App Action Bar back button color to white?
I've been trying to get the back button to become white using the default App Bar in my Android App. I looked at and tried a number of suggestions in this post as well and ran up against the following ...
- reputation score 3414
Score of 0
1 answer
71 views
Android app crashes on launch: java.lang.ClassNotFoundException for existing Composable screen class
I'm building a Quran app using Jetpack Compose in Kotlin. The app builds successfully and installs on a real Android device (Samsung S908E), but crashes instantly on launch.
Crash Log:
Caused by: java....
- reputation score 1
Score of 2
1 answer
158 views
Why can't I use serializable objects with NavHost?
I'm learning how to use NavHost, but I don't know why Android Studio keeps telling me that NavHost doesn't have any options to use serializable objects:
None of the following candidates is applicable:
...
- reputation score 23
Score of 0
1 answer
235 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 = ...
Score of 0
0 answers
74 views
How can I open files from other apps in my app at a specific screen using Jetpack Compose Navigation?
So I have configured intent-filters in the manifest of the app, my app can be opened from other file browser/explorer apps
class MainActivity : ComponentActivity() {
override fun onCreate(...
Score of 0
1 answer
87 views
findNavController().navigate from composable in fragment leads to exception
I have a normal fragment subclass that used to be based on views & used viewbinding. I'm migrating to compose slowly so I've basically removed the view-related code and now use the onCreateView() ...
- reputation score 1347
Score of 2
2 answers
482 views
SafeArgs does not work anymoe after Android Studio update
I have an app that has been working properly for many years and I also installed it on several phones and tablets without any problems. Unfortunately I mad an update of Android Studio (from Flamingo ...
- reputation score 912
Score of 0
1 answer
285 views
Restoring view model state when navigating back
I have a question about how to handle back navigation for a specific situation in my project. The basics look something like this:
I have a tutorial (written all in Compose) that's split into three ...
- reputation score 414
Score of 1
1 answer
179 views
Navigation Compose Type Safety got issue when navigate back from other app
I’m using the Navigation Compose type-safe routes feature with Kotlin serialization. My routes are defined as @Serializable objects to achieve type safety in navigation. Everything works fine until ...
- reputation score 668