3,156 questions
3
votes
1
answer
121
views
How to prevent the virtual keyboard from getting stuck to the text field in Jetpack Compose?
When I click on a text field, the keyboard appears. The problem is that it sticks directly to the text field, with no visible space between the two. I am using Jetpack Compose and would like there to ...
Advice
1
vote
1
replies
28
views
With Jetpack Glance, how do I place a HorizontalDivider between my items in a LazyColumn?
I am building my home widget UI with Glance. I can see there is a HorizontalDivider Jetpack Compose Component. However, it seems like there doesn't exist one for use with Jetpack Glance? I am trying ...
Advice
0
votes
4
replies
77
views
How can I improve seat rendering in compose when the layout is separated by section, row, and column?
I am confused as to why my app is lagging when I scroll down to this seat layout. What's wrong with my code? Can somebody tell me how I can improve the performance? Here is the code to create the ...
1
vote
0
answers
91
views
ClassCastException when using ViewModelProvider.Factory in release build after R8 obfuscation (works fine in debug)
I'm facing a strange issue that only occurs in the release build of my Android app (signed and uploaded to Google Play).
In debug mode, everything works perfectly.
After publishing or installing the ...
3
votes
1
answer
211
views
How can I make a child Image overflow beyond its parent Row bounds in Jetpack Compose (similar to SwiftUI behavior)?
I’m building a dynamic Jetpack Compose UI where layouts are driven by JSON configuration.
Each container can be either vertical (Column) or horizontal (Row), and components like text, icons, and ...
3
votes
1
answer
217
views
How to Change Jetpack Compose Bom Version to Alpha in libs.versions.toml?
I want to use state based TextField. I've learned that to use a state-based TextField, I must change the bom version to alpha. How can I change the bom version to alpha in libs.versions.toml?
[...
0
votes
1
answer
89
views
Jetpack Compose: How to align item in Row so that it is at same height than other item?
In Jetpack Compose, I have a Row with two Columns. In Column A, there is only one Text item and in Column B, there are three text items. I would like the center part to be at the same height, i.e. in ...
0
votes
1
answer
930
views
Jetpack Compose Material 3: How to use Expressive style Pull-to-Refresh indicator with PullToRefreshBox?
I'm updating my Jetpack Compose to use the latest Material 3 dependencies.
material = "1.12.0"
composeBom = "2025.07.00"
compose-material3 = "1.4.0-rc01"
I wrote this ...
1
vote
1
answer
112
views
How to display top border with rounded corners using jetpack compose in android?
I need to display top border for box with left and right rounded corners. I tried with the below code.
Box(
modifier = Modifier
drawLine(
color = Color.Red,
...
3
votes
1
answer
274
views
Fatal Exception: java.lang.IllegalArgumentException Cannot coerce value to an empty range: maximum 0 is less than minimum 7
I’m using Jetpack Compose’s HorizontalPager with a dynamic list of items in my app. Occasionally, my crash reporting service logs the following crash, but I have never been able to reproduce it ...
2
votes
1
answer
203
views
In Jetpack Compose, how can I prevent HorizontalPager from scrolling when swiping left or right on the edge of the screen?
I've created a HorizontalPager with a width that matches the screen. However, I've noticed that when I use the edge swipe gesture on the phone to go back to the previous screen, it momentarily causes ...
2
votes
2
answers
210
views
Jetpack Compose: potential race condition when the user navigates
It is common that onClick lambdas (call methods that) perform viewModelScope.launch { ... }. I see a possible race condition here, the viewModelScope may be cancelled before the launched action is ...
2
votes
1
answer
105
views
State being lost when LazyColumn items move between item blocks
It seems like LazyColumn is losing state on rows when moved between different item calls even though they're keyed. It was my understanding that if two items existed with the same key the composable ...
2
votes
1
answer
158
views
How, in Compose, set the size of an element to a specific children's size?
The setup
In Jetpack Compose, I have a Column (gray) with two elements, a long text (yellow) and a short text (cyan):
@Composable
@Preview
fun Foo() = Column(
Modifier
.background(Color....
0
votes
1
answer
343
views
Jetpack Compose: draw behind navigation bar, navigationBarColor deprecated
I want my Android Jetpack Compose app to draw behind the system navigation bar, but not behind the system status bar.
I managed to do this, but for window.navigationBarColor I get the warning:
...