1,227 questions
0
votes
1
answer
72
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 ...
0
votes
1
answer
76
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 ...
3
votes
0
answers
99
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 ...
0
votes
1
answer
107
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?...
0
votes
1
answer
72
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 ...
0
votes
1
answer
67
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 ...
0
votes
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....
2
votes
1
answer
147
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:
...
0
votes
0
answers
15
views
Responding to fragment navigation changes in androidx.navigation
The documentation for FragmentNavigator says
The current Fragment from FragmentNavigator's perspective can be retrieved by calling FragmentManager.getPrimaryNavigationFragment with the ...
0
votes
1
answer
215
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 = ...
0
votes
0
answers
59
views
Android Compose Navigation out of Scaffold
my Compose app is structured with a Scaffold with its NavHost and BottomNavBar. The scaffold contains three navigation graphs, each of them containing several composables. Navigation can be achieved ...
0
votes
0
answers
67
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(...
0
votes
0
answers
45
views
Desparate navigation structure with Official Navigation Library
I'm aiming this scenario:
I have different features like auth with 3 screens, profile with several screens, email with several screens and so on... I want to setup a navigation structure that mainly ...
0
votes
1
answer
80
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() ...
2
votes
2
answers
461
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 ...