Questions tagged [jetpack-compose]
33 questions
4
votes
0 answers
Pages beyond the bounds of HorizontalPager never call onDispose | Jetpack Compose
I've found strange behavior in HorizontalPager.
Pages beyond the bounds never call onDispose inside DisposableEffect. In other words, what kind of key DisposableEffect must consume in order to trigger onDispose once the page becomes "inactive"(stops…

Akbolat SSS
- 1,761
- 15
- 23
4
votes
3 answers
How to make LaunchedEffect run once and never again?
I know that LaunchedEffect(key) is executed when composition starts, and is also cancelled and re-executed again when the key changes. However, I want it to be executed only once and never again, I am using the following workaround but I feel like I…

yuroyami
- 814
- 6
- 24
4
votes
2 answers
stringResource() causing recompose of composition
I am beginner at jetpack compose. I was debugging recomposition but suddenly I saw a unusual recomposition in Header compose function when app start.
I find out the reason or culprit for the recomposition that I used in Header compose function to…

Kawsar
- 111
- 1
- 4
3
votes
1 answer
Android Jetpack Compose. java.lang.IllegalStateException: Already in the pool
Firebase is informing crash with stack trace below for OS Versions Android 7 and lower. I can't figure out where is the problem. The project is almost 100% written in Jetpack Compose but has a couple of AndroidViews
Fatal Exception:…

Bakhtiyor Begmatov
- 433
- 5
- 13
2
votes
1 answer
Cant use combinedClickable and pointerInput on any component of Jetpack compose
Im trying to make a FLoatingActionButton that allows me to use onLongClick and gesture detection in case is draging up. Just creating the behavior of telegram or ws recording button.
Test 1 Using FloatingActionButton from Material3 dont work cause…
2
votes
2 answers
Jetpack Compose: Detecting 2-finger swipe or drag gesture
I don't even know where to begin, nothing similar was ever implemented in Jetpack Compose. How can I make a composable detect 2-finger swipe (or drag) gesture ? Preferably (but not necessarily) without consuming them

yuroyami
- 814
- 6
- 24
2
votes
1 answer
Using Constraint Layout in Jetpack Compose Desktop
I have a new Jetpack Compose desktop project in Intellij setup using the new project wizard. I would like to use ConstraintLayout like in Android, so I add the following line
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
in the…

Hisham Hijjawi
- 1,803
- 2
- 17
- 27
2
votes
2 answers
Jetpack Compose Circular Progress Indicator background color missing
I am trying to implement the circular progress indicator using jetpack compose (docs for reference
Cirular Progress Indicator Docs)
in the docs they have mentioned the backgroundColor property, but inside the source code of CircularProgressIndicator…

Chandra Shekhar
- 3,550
- 2
- 14
- 22
1
vote
1 answer
Jetpack compose animation - Can I use AnimatedVisibility inside MotionLayout?
I am trying to display splash screen where elements would have enter animation and when data would be loaded for the first time then minimize it to top app bar and display data.
Edit:
I managed to put both animation to one screen, but I am not sure…

gabilcious
- 38
- 5
1
vote
1 answer
Preformance in jetpackCompose
As you can see in the code, I have two composable functions named Screen and Body.
When the state of the showError changes, the body function is also recompose. Does it have any side effect? If yes, how to avoid this recompose.
@Composable
…

Leila_ygb
- 51
- 4
1
vote
0 answers
Bottom Sheet's scroll behavior is triggered instead of the Column's scroll behavior
I have a BottomSheetDialogFragment. In the OnCreateView, I return a ComposeView. Inside the ComposeView, I have a Column with a Vertical Scroll
since the column has quite a few items.
When I swipe up the bottom sheet, the bottom sheet fills the…

Vikram Ragu
- 169
- 1
- 8
1
vote
2 answers
transform card's shape in jetpack compose
can anyone tell me how to create below shape in jetpack compose
Thank you in advance

Jayant Kumar
- 775
- 5
- 12
1
vote
2 answers
The title won't minimize dialog in JetPack Compose BottomSheetDialog with rememberNestedScrollInteropConnection
I have BottomDialog Fragment which consists only of Composable (Row(title) and LazyColumn).
The first issue I faced was when you scroll your list down and then you try to scroll up list won't scroll and the dialog starts to minimize. This is solved…

Joao
- 374
- 3
- 16
1
vote
1 answer
Kotlin - Clarification Needed Regarding the Data Classes Copy Function
Hello everyone I am new to Jetpack Compose.
Needed clarification reagarding the usage of Copy Function in kotlin Data Classes.
Here i am using a NetworkFetchState abstract class, which helps me determine the state of the network call.
// Abstract…

Chandra Shekhar
- 3,550
- 2
- 14
- 22
0
votes
1 answer
Kotlin Multiplatform testing commonTest @Composable UI
I'm attempting a Kotlin Compose Multiplatform project and want to write a unit test for a piece of @Composable UI in my commonMain project. From the references I've found online, I should be able to do the following:
@get:Rule
val compose =…

Jesser
- 76
- 7