13,998 questions
0
votes
0
answers
14
views
How to suspend coroutine in a composable function until a specific value appears in a SnapshotStateList
How to properly wait for a specific value to be added to a SnapshotStateList defined in a ViewModel from a Composable function.
My current implementation executes immediately without waiting for the ...
0
votes
1
answer
16
views
androidx.lifecycle:lifecycle.viewmodel.compose vs androidx.hilt:hilt.navigation.compose [duplicate]
Following Android documentation from various places:
Use Hilt with other Jetpack libraries: Inject ViewModel objects with Hilt
Compose and other libraries: ViewModel
Compose and other libraries: Hilt
...
0
votes
0
answers
12
views
Keyboard overlaps content in Jetpack Compose
I cannot do it.
My manifest is like this:
<activity
android:name=".app.MainActivity"
android:exported="true"
android:windowSoftInputMode="...
1
vote
1
answer
26
views
How to update a value of a UiState on a StateFlow?
Having this on my viewmodel:
val uiState: StateFlow<BusStopsDBScreenUiState> = busDataRepository.getBusStops()
.map<List<BusStop>, BusStopsDBScreenUiState> { busStops ->
...
0
votes
1
answer
27
views
Using custom input method in compose 1.7.0 and above
I was using LocalTextInputService and TextInputService to show my own custom input TextField in app. But they are deprecated in compose 1.7.0 and as result CoreTextField is stopped receiving ...
0
votes
0
answers
16
views
Hardware keyboard focus never lands on Annotated string hyperlink in Jetpack compose
I have created an annotated string in Jetpack composable and assigned it to composable Text view. It has multiple hyperlinks.
The code is as below:
@Composable
fun HyperlinkText(
fullText: ...
0
votes
1
answer
39
views
Why is the shadow not showing on my NavigationBar in Jetpack Compose?
I’m using Jetpack Compose and trying to implement a NavigationBar with a shadow, but the shadow isn’t displaying as expected. Here’s the code I have so far:
@Composable
fun MainScreen() {
val ...
0
votes
0
answers
24
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 ...
-1
votes
0
answers
18
views
Content is not allowed in prolog in running Gradle in Jetpack compose
What is the solution to "Content is not allowed in prolog", in Kotlin Jetpack Compose when running your code. What can I do to solve that?
The error is failing to allowed the gradle(sync) to ...
0
votes
0
answers
24
views
ModalBottomSheet gravity in expanded window size [closed]
In the Material3 documentation, it is mentioned that on large screens, a "Floating Sheet" should be used. However, when I try to implement a ModalBottomSheet in Jetpack Compose, it always ...
0
votes
0
answers
19
views
Firebase Google analytics doesn't work in jetpack compose
I carefully did all the tutorial said, like 5 times already, and nothing works.
there's no any data in my firebase console, and yes i'm sure its this project.
Here is all i did:
Installed all ...
0
votes
1
answer
24
views
Word Navigation in red in imports
I am stuck here, can't resolve it, tried hard for a long time.
I want to use navigation in wear os projet, I can't do the imports properly.
Here is my file :
/* While this template provides a good ...
0
votes
1
answer
35
views
Modal bottom sheet - How do I set the height of the modal
How do I set the height of the modal? On a larger screen the modal appears whole, on a smaller screen it takes up about 80% of the screen. I tried LocalConfiguration.current.screenWidthDp but it didn'...
0
votes
0
answers
26
views
I want to use a SpeedoMeter widget with compose UI for my android project but i can't figure out how to add it
I am using the following repository as a reference: https://github.com/anastr/Speedometer/tree/master
I have a native Android project and have added the dependencies mentioned in the repository to my ...
0
votes
0
answers
28
views
Build Failed Android Studio Kotlin Jetpack compose
I've been trying to run my app for days with no success here's the error output
BUILD FAILED in 8m 32s
48 actionable tasks: 2 executed, 46 up-to-date
Configuration cache entry reused
Exception is:
...