192 questions with no answers
0
votes
0
answers
102
views
How to implement per screen TopAppBar and BottomAppBar in Jetpack Compose?
I have my composable MainNavHost which controls the navigation as shown using the new Navigation 3 library. The Scaffold here has my TopAppBar and BottomAppBar for navigating between the 4 major ...
0
votes
0
answers
159
views
How to manage focus (and restore it) between TVLazyRow/LazyRow and focusable buttons in Android TV app?
I am developing an Android TV app using Jetpack Compose and D-pad navigation.
My main screen UI looks like this:
A Column as the main container
The first item is a TVLazyRow or a normal LazyRow (...
0
votes
0
answers
61
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(...
2
votes
0
answers
87
views
Type-Safe Navigation with Nested Graphs, NavigationBar, and Inclusive PopUp in Jetpack Compose
Is there a proper example of type-safe navigation with nested graphs where one of the graphs includes a NavigationBar with its own screens, and an auth/splash/onboarding screen is removed from the ...
0
votes
0
answers
33
views
Is it possible to use NavDeepLinkBuilder to build a explicit deep link based on serializable route?
The current NavDeepLinkBuilder seemingly only supports setDestination(id: int) or setDestination(id: String). I'm using navigationCompose = "2.8.0".
I tried to use MyRoute::class.serializer()...
0
votes
0
answers
32
views
Open a sub screen with full dimension from Bottom Navigation Bar
I'm in certain situation where the problem seems hard to find proper answers, hope you guys can help me.
MainScreen contains a Bottom Navigation, which has an Explore tab. This tab displays the movie ...
0
votes
0
answers
137
views
Compose TypeSafe Navigation - save state of ViewModel
I'm using Compose TypeSafe navigation for my application.
This is one of the extension function called in NavHost
private fun NavGraphBuilder.loginNavigation(navController: NavHostController) {
...
0
votes
0
answers
78
views
Jetpack Compose Navigation navigate build backstack when navigating
I have the following nested graph:
@Serializable private data object Onboarding
@Serializable private data object OnboardingScreen1
@Serializable private data object OnboardingScreen2
@Serializable ...
0
votes
0
answers
394
views
Android Compose with Navigation - DeepLink with full URI
I’m using Jetpack Navigation with Compose in my application, and I need to parse a URI that can originate from two different sources:
1. A QR code scanned internally within the app.
2. A deep link.
...
3
votes
0
answers
51
views
How to Properly Handle Navigation and Back Stack Logic in Jetpack Compose Navigation?
I need an implementation that follows this navigation pattern. For example, there are screens a, b, c, and d. The navigation sequence is a > b > d > c > b > d. When we are on screen d ...
0
votes
0
answers
57
views
Separate content and title in Compose Multiplatform
I am making a Compose Multiplatform App and want to organize my layout based on the platform and screen size.
I would like this layout on mobile :
And this one for desktop :
But the toolbar is ...
0
votes
0
answers
37
views
Is is possible to pass annotation class as a arguments to compose navigation?
Is is possible to pass this as an arguments to compose navigation?
Now I stil used navigation xml to change from page to another one
I would like to change to navigation compose but I am not sure that ...
0
votes
0
answers
83
views
Jetpack navigation: How to update ViewModel on dialog close?
I'm working on a simple SoundBoard app to get familiar with Jetpack Compose and Navigation. I'm fairly new to both technologies and am struggling with this:
Main view in the app is a grid-like view of ...
2
votes
0
answers
36
views
Navigating to a top level destination doesn't save all toplevel states
Problem
There are three navigation graphs in my app as nested navigations : HomeGraph, ProfileGraph and MenuGraph. I want to achieve that when you navigate between these graphs through the ...
0
votes
0
answers
106
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 ...
2
votes
0
answers
75
views
Compose: Triggering Navigation callback from Composable with state changes causing infinite calls on navigation
I have Splash screen (or any other Screen) which is calling API and changing state from Loading to Finished or Failed.
This is my UiModel:
@Immutable
data class SplashUiModel(
var state: ...
1
vote
0
answers
113
views
How to make whole immersive view visible all the time, when having multiple immersive views on Android TV using Jetpack Compose?
I work on Android TV app using Jetpack Compose. I follow the Guide and I want to make a page with multiple immersive views. I also want to be able to change focus from one to other immersive view and ...
3
votes
0
answers
528
views
Jetpack Compose TopAppBar: How to remember collapsed state only per page
If I scroll down, the top app bar collapses as expected, and then I navigate to another screen (for the first time) from the bottom bar - however, the top app bar is in the collapsed state (because I ...
1
vote
0
answers
224
views
Android Predictive back gesture animation with jetpack navigation: IllegalArgumentException when selecting an item after cancelled Back Progress
This is the simplified version of my implementation of predictive back animation using jetpack navigation lib.
MainActivity:
class MainActivity : AppCompatActivity() {
private lateinit var ...
1
vote
0
answers
98
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 ...
4
votes
0
answers
455
views
Compose Navigation Animation not working with latest navigation compose library 2.8.0-beta02
I was using slide animations for navigating between screens in Jetpack Compose Navigation using string-based route navigation and everything was working fine. But now I have upgraded the navigation ...
1
vote
0
answers
614
views
Navigation graph has not been set for NavController
I have 2 activities.
Main activity, let's call A has the navigation controller setup with Compose. The navigation controller works fine and it uses the same everywhere (No duplicated NavHostController)...
0
votes
0
answers
24
views
IllegalArgumentException in global navigation
I'm using jetpack navigation, but when I try to do a global navigation, I got an IllegalArgumentException:
java.lang.IllegalArgumentException: Navigation action/destination com.myexample:id/...
2
votes
0
answers
371
views
Compose Navigation recomposition on navigation
I saw an issue in android compose navigation. I have a simple app with two screens, each containing a button to the other screen, each screen have a log statement in the begining. On pressing the ...
2
votes
0
answers
707
views
Compose performance issue during navigation
Hello there guys 😄 We've decided to rewrite our app to compose. However we've faced a performance issue, specially on slower devices (like my Xiaomi POCO X3). On Samsung S22 and on any emulator ...
0
votes
0
answers
282
views
Possibility to navigation when app is in background
I would like to ask about possibility to modify backstack and navigate to previous screen when app is not in foreground with Jetpack Compose approach (without fragments)
My case:
App1 opens list apps ...
0
votes
0
answers
140
views
passing date value in navigation-compose
I'm trying to create an application with 2 pages with jetpack compose On the first page users would enter their sign-in information such as first name, last name, id, and date of birth, and then on ...
2
votes
0
answers
91
views
How to add modifier in rememberScaffoldState of snackbarHostState?
So, I've been following this article. The code below shows the snackbar state, how do I add modifier in the below code so that I can have the snackbar show in top or bottom area. My goal is to somehow ...
2
votes
0
answers
31
views
How can I navigate back to LoginScreen from ProfileScreen having bottomnavbar in compose
Here is Code for the reference I have 3 navgraphs one for rootNavs and 2nd one for authentication and 3rd one for in app navigation/bottombar navigation
RootNavGraph
@Composable
fun RootNavGraph(...
1
vote
0
answers
261
views
How to 3D view button and and textFields in Jetpack compose
hi I want create app like complete 3D module in jetpack compose in android can anybody please suggest me any thing do good library or modules for this, thanks in advance.
2
votes
0
answers
304
views
Testing Jetpack Compose - SwipeRight() For Back Navigation
I'm doing UI testing for a Jetpack Compose app. My question is, can you navigate on the previous screen using the SwipeRight() gesture? I've already tried it but it hasn't allowed me yet, I don't know ...
0
votes
0
answers
246
views
Is it possible to save the NavBackStackEntry's ViewModels?
I've been trying to create a custom saver for my app state in Jetpack Compose such:
object MainAppSaver:Saver<AppState, Map<String, Any>>
{
override fun restore(value: Map<String,...
0
votes
0
answers
47
views
Jetpack navigation fails to navigate to LoginScreen.kt
While navigating to other screens, Jetpack compose navigation in SignUpScreen.kt fails to navigateTo LoginScreen.kt. I used sealed class to define the screens and data object to define sub-screens. ...
2
votes
0
answers
510
views
android compose navigation: dialog destination automatically popped when app is minimized
below is a part of my code, (full code can be found here).
The problem is that the destination content/{mode} (last destination) is automatically popped, when app gets minimized.
What should I do to ...
2
votes
0
answers
508
views
Navigating to Composable Screen from BroadcastReceiver
I'm working on an Android app using Jetpack Compose and I need to implement Alarm Clock functionality. This in itself is working but I'm trying to figure out how to launch a Composable Screen (i.e., ...
0
votes
0
answers
326
views
How to add a fragment in a compose navhost without re-writing entire code
So we refactored our app to start using Jetpack compose problem is we encountered a problem. So it was easy to refactor the other screens but when it came to this main screen it has more logic and ...
0
votes
0
answers
47
views
The navigation keys of the device vibrate when opening the Jetpack Compose Dropdown Menu
When the Dropdown Menu is opened, there is a flicker in the navigation keys. When I create a new application with the same codes, there is no problem, but this flicker occurs in my current application....
6
votes
0
answers
2k
views
Jetpack Compose - Change startDestination of navigation dynamically in runtime
Is there a way to dynamically change NavHost's startDestination parameter at runtime?
Problem:
I would like to show on boarding screen only the first time you start the app. Every next time it is ...
1
vote
0
answers
34
views
why the layout created programmatically in Android is created initially but not created afterwards
I received a data list from the server and based on that list, I programmatically created layouts and views. The layout is composed of a ConstraintLayout containing TextView, RadioGroup, and ...
1
vote
0
answers
1k
views
How to add Transition animation in android jetpack Compose Destination library?
I have started learning Android Jetpack Compose and I come across Compose Destination library which is the best for navigation. But now I am stuck on the navigation transition part where I want to ...
1
vote
0
answers
41
views
Navigation Component implicit deeplink with backstack
I have three screens. A, B and C.
A -> B -> C
What I want is that when I navigate to C with implicit deeplink (e.g. with a url), when back button is pressed, app goes to B, not A.
2
votes
0
answers
731
views
How to navigate to a specific destination via deep link without adding any other destination in the backstack
Suppose I have the following setup:
nav_graph_a.xml
Fragment A (start destination)
includes nav_graph_b
nav_graph_b.xml
Fragment B (start destination)
Fragment C (has a deep link to it)
And an ...
1
vote
0
answers
563
views
How to navigate to login module from feature module in multi module compose project
I'm working on a multi module compose project where I'm having difficulty navigating from one module to another the module dependancy is follows as bellow:
common module (common ui component for ...
1
vote
0
answers
328
views
How to handle various App states effectively with conditional navigation in Jetpack Compose
Question: When navigating to another screen ( Home Screen ) from Login, the state of Login Composable persists and when coming back( Logging out ) from the HomeScreen, the logic brings to Home ...
1
vote
0
answers
195
views
Navigate from jetpack compose activity to xml activity
every time i try to navigate from a jetpack compose activity to an xml activity the app crashes and i get this error : Process: Sending signal. PID: 4409 SIG: 9
i am confused about what to do in order ...
6
votes
0
answers
551
views
IllegalStateException: Restore State failed: destination Fragment2 cannot be found from the current destination Fragment4
I am using the Jetpack Navigation library, Graph A is a graph similar to Login, where Graph B is the main content containing a BottomNavigationView, the problem occurs in one scenario only.
User is ...
1
vote
0
answers
147
views
Navigation action/destination cannot be found from the current destination NavGraph
Using latest Navigation component libraries 2.5.3.
I am encountering the classic crash
Fatal Exception: java.lang.IllegalArgumentException Navigation action/destination **:id/...
4
votes
0
answers
1k
views
Jetpack Compose Navigation, when I navigate to another screen the code of that screen seems to run multiple times
val navController = rememberNavController()
NavHost(navController = navController, startDestination = "main") {
composable("main"){
mainscreen(navController)
...
1
vote
0
answers
892
views
Jetpack Navigation: How to check if route exists already to avoid IllegalArgumentException on cannot be found in the navigation graph
I am building the navigation graph dynamically and the code that calls navigate() finds that the route is not present yet. That may be a race condition or a bug but I still want to handle it ...
3
votes
0
answers
763
views
How handle singletop navigation in Jetpack Compose with screen with arguments
I have a scenario with three screens. First the main screen A. Lastly two screens with parameters: screen B("screenB?arguments={arguments}}") and screen C("screenC?arguments={arguments}&...