41 questions
1
vote
2
answers
46
views
Going back to the Home screen with arguments
I have 3 screens :
sealed class MyNavigation {
@Serializable
data class Home(
val id: Int
) : MyNavigation()
@Serializable
data object Detail : ...
1
vote
1
answer
109
views
Compose Navigation - Incompatibility and workaround with Serialized Objects
I have a project where I am using the material 3 top app bar. Naturally when I am on my home page, I want to hide the back button since there is nothing on the backstack. However, I am not using ...
1
vote
0
answers
85
views
Jetpack compose typesafe navigation crash
Restoring the Navigation back stack failed: destination 30355061 cannot be found from the current destination mj0(0x0) startDestination={oj0(0x2e873c) route=x.x.x.x.composeNavigation.MenuScreen}
I ...
2
votes
1
answer
47
views
Issue in handling navigation in compose
I am sending phone number and userId from RegisterScreen to OtpVerificationScreen. But I can't popBackStack from OtpVerificationScreen to RegisterScreen.
Please help me fix this I want user to ...
0
votes
1
answer
443
views
Compose Multiplatform Navigation: handle Back button with Navigator BackStack
I am working on an application, which has a complex nav graph.
The problem is How to handle back button in topAppBar in this situation?
I want to use navController to know it's navigated from MainNav ...
2
votes
1
answer
506
views
Issue with popBackStack and Type Safety in Navigation Compose wit Serialization
I'm working on an Android app using Navigation Compose with type safety. I have the following navigation setup with four screens: ScreenA, ScreenB, ScreenC, and ScreenD. The navigation flow is as ...
0
votes
0
answers
28
views
How to set up NavHost for android UI testing?
java.lang.IllegalArgumentException: Cannot navigate to NavDeepLinkRequest{ uri=android-app://androidx.navigation/movies/ }. Navigation graph has not been set for NavController androidx.navigation....
2
votes
1
answer
1k
views
On Android, new version of Navigation Compose (2.8.0-alpha08 and up) not compatible with TextFieldState?
I am building an Android app based on a online course from PL-Coding, I wanted to implement the new compose navigation version (2.8.0-alpha08) with type safe navigation arguments. The problem is that ...
0
votes
1
answer
85
views
Is Incremental Migration to Jetpack Compose Navigation Possible with Mixed Traditional Fragment Navigation?
I am currently working on migrating our application from using traditional fragment-based navigation to Jetpack Compose Navigation. All our screens are currently built with fragments that utilize ...
0
votes
1
answer
100
views
java.lang.IllegalArgumentException: CreationExtras must have a value by `SAVED_STATE_REGISTRY_OWNER_KEY`
sToday I've upgraded some libraries then I started the app and when I click the button that is navigation button , I got this error :
java.lang.IllegalArgumentException: CreationExtras must have a ...
0
votes
0
answers
60
views
Navigation destination is being called 4 times for some reason in jetpack compose?
This is my NavGraph, here the destination "VerificationScreen/{verificationId}" is being called 4 times thus creating the viewmodel 4 times. What could be reason for this?
@Composable
fun ...
0
votes
0
answers
500
views
Navigation Compose Error : " cannot be found in the navigation graph ComposeNavGraph(0x0) "
I'm passing object of Student to StudentPage with Gson this is NavGraph file
composable(
Screen.StudentPage.route, arguments = listOf(
navArgument("studentObject") {
...
1
vote
0
answers
86
views
Jetpack Compose Deeplinks Redirecting Incorrectly Despite Different uriPattern
I'm encountering an issue with Jetpack Compose deeplinks where they're consistently redirecting to the ResetPasswordRoute destination, despite having different uriPattern configurations. Here's an ...
1
vote
0
answers
490
views
Given component holder class androidx.activity.ComponentActivity does not implement interface dagger.hilt.internal.GeneratedComponent
I'm doing an app in Android/Kotlin as a portfolio, and I want to use navigation testing to do UI tests. But the app also has Hilt and I had to configure both to run the tests, using Hilt android ...
1
vote
2
answers
683
views
Navigation compose deprecated backQueue
I updated the androidx.navigation:navigation-compose from version 2.5.3 to 2.7.4 and I get the error:Cannot access 'backQueue': it is private in 'NavController'
private fun NavOptionsBuilder....
4
votes
1
answer
2k
views
do I have to pass the navController to all my composables?
I am new to jetpack Composable.
I'm trying to build a new app using Composables in MainActivity.
so there will be only one activity and no fragments and all Composables.
I want to know do I have to ...
1
vote
1
answer
166
views
How to use navigation in Jetpack Compose android
While trying to navigate from MapsScreen to SignupScreen in Jetpack Compose, although I see in logcat that SignUp is clicked,I am not able to navigate to SignupScreen. I have setup the navgraph and ...
1
vote
0
answers
94
views
Injecting NavBackStackEntry to composable in tests of NavHost
I'd like to pass mandatory nav args into my (Robolectric) tests so that I can run the code for my lower level composable. My code is based on how navigation was used in an earlier version of the TiVi ...
14
votes
2
answers
7k
views
Navigation Compose animation is always using the default transition
I just migrated to navigation compose version 2.7.3 and am trying to implement the new animations. My issue is the animations don't work on some of the screens and is always the default fade animation....
1
vote
1
answer
676
views
Clear Bottom Nav Saved State - Jetpack Compose
The current flow of my app is as follows:
Login Screen -> Home Screen with 4 bottom nav tabs.
I'm saving the state of my bottom nav tabs using android documentation as stated here:
https://...
0
votes
2
answers
1k
views
Compose Navigation screen blinks when navigate to another screen
When i am trying to navigate to another screen by .clickable on modifier i got this. Never faced such problem earlier. This is how i navigate and what i see on screen.
What i show if response from ...
0
votes
0
answers
30
views
Naviagtion XYZ cant be found from current destination()
I often get this error a lot in all my projects
Navigation action/destination com.speakerbooster.volumebass.equalizersound.amplifier:id/action_premiumFragment_to_dashboardFragment cannot be found from ...
0
votes
1
answer
66
views
Problem opening different screen for the list of data items using jetpack Compose
Clicking on item 1 opens Screen1,
Clicking on item 2 opens Screen1,
Clicking on item 3 opens Screen1,
Instead the folowing should happed:
Clicking on item 1 should open Screen1,
Clicking on item 2 ...
0
votes
1
answer
664
views
Navigation to a different screen in jetpack compose
The layout I want to achieve is the following:
Three (3) destinations on the bottom app bar
The first destination ( HOME ) has bottons to access other destinations, for example a settings screen ...
1
vote
0
answers
844
views
ExoPlayer issue using AndroidView in LazyColumn Compose
I am trying to have a videoplayer (using ExoPlayer occupying half of the screen's height) at the top of the LazyColumn and list of items below the video player using compose. The list of items ...
-1
votes
1
answer
70
views
Going from one screen to another by tapping on item in list of menu items
I have an app which display list of menu items retrieved from server and stored in room database. Now i want to add another screen that should display details of item that user would click on the 1st ...
0
votes
1
answer
255
views
Instantiate ViewModel with composable scope
I want to instantiate a ViewModel with scope of a Composable function.
How can I do this?
I don't want to use navigation-compose to take advantage of its BackStackEntry as ViewModelStoreOwner.
3
votes
1
answer
1k
views
How to prevent entire composable from recomposing when popping backstack in navigation composable
What currently is happening:
I have a grid screen and on clicking on the list I navigate to the detail
screen
Now on clicking the back button I navigate back to the list screen
What is the issue:
...
4
votes
0
answers
993
views
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 ...
2
votes
1
answer
2k
views
How to handle state flow on back navigate on compose
I am following unidirectional flow in compose for ui state so basically i have sealed class as follow
sealed class UiState{
objet Loading:UiState()
object Success:UiState()
object Error(val error:...
3
votes
3
answers
3k
views
compose navigation handle when composable returned after back
Let's say I have 2 screens HomeScreen and DetailScreen and use compose navigation to navigate between screens.
The graph is HomeScreen -> DetailScreen.
When I pressed back on DetailScreen and ...
3
votes
1
answer
1k
views
Compose navigation lose state after pop screen (navigate for network success)
I am using compose navigation with single activity and no fragments.
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(...
7
votes
1
answer
2k
views
Jetpack Compose Navigation - Passing local file location as string
I am trying to pass audio file location(/storage/emulated/0/Android/media/...) as string from first screenhome_screen to second screendetail_screen,
When I pass normally above string as a parameter I ...
4
votes
1
answer
3k
views
How to integrate AlertDialog with Navigation component in Jetpack Compose?
I am using Jetpack Compose and the Android navigation component. When I am on a screen with an AlertDialog, I am unable to navigate back. I guess it's due to the AlertDialog catching the back button ...
0
votes
1
answer
537
views
JetpackCompose Fragment onCreate issue
I need to call a function in my SignScreen's onCreate method but there is not any applicable place for this. I can't call currentUserCheck function from anywhere.
What i tried :
Calling it in init ...
1
vote
1
answer
8k
views
Does NavOptionsBuilder.launchSingleTop work with nested navigation graphs in Jetpack Compose?
I'm using BottomNavigation in Jetpack Compose with navigation-compose:2.5.0-alpha04 and I want to encapsulate each tab's flow with nested navigation. To achieve this I created a single NavHost with ...
1
vote
2
answers
1k
views
Add menu icons from fragement into host actvity toolbar - Navigation component
Iam using single activity navigation component structure.
In host activity iam using navigation drawer and bottom navigation.
So There are 2 frgaments inside bottom navigation Fragment A and Fragment ...
9
votes
4
answers
3k
views
Screens are flashing when I navigate to them in Dark theme using Navigation-compose
I am using Navigation-Compose in my app :
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
ComposeTheme {
...
2
votes
1
answer
1k
views
How can be saved the destinations of nested navigation graph's id in the bottom navigation Jetpack Compose?
I am facing some problems with navigation's back stacks in Jetpack Compose. The following diagram is my desired scenario.
I have bottom bar and two items Home and Setting. And I want to make both as ...
3
votes
0
answers
2k
views
Navigation in Jetpack Compose - Fragments/ViewModels
So I'm checking this official Compose tutorial https://developer.android.com/courses/pathways/compose
There is Jetpack Compose Navigation
https://developer.android.com/codelabs/jetpack-compose-...
12
votes
1
answer
3k
views
How to do Assisted Injection with Navigation Compose?
I've a composable called ParentScreen and a ViewModel named ParentViewModel. Inside the ParentViewModel, I am collecting a value from my repo.
class MyRepo @Inject constructor() {
fun ...