3,162 questions
Advice
0
votes
2
replies
49
views
how can I improve seat rendering in compose when the layout is separated by section, row, and column
I confused why my apps is lagging when I scroll down to this seat layout, what's wrong with my code? Can somebody tell me how can I improve the performance. Here is my code that I used for to create ...
1
vote
0
answers
66
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 ...
0
votes
0
answers
33
views
Why is a dropdownmenu bigger than its content? [duplicate]
Why is the DropdownMenu Container bigger then its child? Is there a minimum size or padding that we don't have control over? Or is it a theming problem? I dont want it to be this big. I want the ...
3
votes
1
answer
184
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
117
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
74
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
424
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
86
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
188
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
145
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
137
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
85
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
100
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
222
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:
...
0
votes
2
answers
310
views
How to disable the dismiss behaviour of a ModalBottomSheet on scroll down?
I am trying to disable the scroll dismiss behavior of ModalBottomSheet. I tried to play around with the rememberModalBottomSheetState, but was not successful to find any solution to this problem.
val ...
0
votes
2
answers
124
views
How to prevent child composable from scrolling parent composable?
I have two composables that look like this
Column(
modifier = Modifier.verticalScroll(rememberScrollState())
) {
Text("a\ntall\ntext...")
Surface(
modifier = Modifier.height(175.dp)...
0
votes
0
answers
104
views
CircularProgressIndicator with AndroidFragment bug
I have reported this as a bug to Google:
https://issuetracker.google.com/issues/422861653
But I figured I would get some good feedback here. The problem is that it looks like mixing an AndroidFragment ...
0
votes
1
answer
93
views
Credential manager not working with server has root certificates
We are trying to implement passkey for our app authentication on Android. For this using https://developer.android.com/reference/android/credentials/CredentialManager.
But when we are trying with this ...
0
votes
0
answers
48
views
How can we get the exif data from a stored image?
If yes, will the exif data changes when we down scale the file? I've tried this:
val file = File(cacheDir, SAMPLE_IMAGE)
val ei = ExifInterface(file.path)
exifInterface.getAttribute(ExifInterface....
0
votes
1
answer
69
views
Text doesn't fit to the edge of Text component with justify in Jetpack Compose
I'm writing a book reader app and I'm trying to style the text for reading (justify, hyphens, etc).
I have the following code for text component:
Text(
text = reader.value[viewModel.currentPage],
...
2
votes
1
answer
116
views
TopAppBar increases height after keyboard popping up
I'm facing an issue with TopAppBar inside a Scaffold in Jetpack Compose (Material 3). I have enabled edge-to-edge display using enableEdgeToEdge() in my Activity and set android:windowSoftInputMode=&...
0
votes
0
answers
33
views
how to reopen exisiting destinations in back stack avoiding duplicates in jetpack compose
Lets say A is the start destination then i opened B and next C which makes my backStack
A->B->C. Great now How can i navigate to existing B without creating a new B such that my backstack now ...
0
votes
1
answer
157
views
Why does using a TextFieldValue in Jetpack Compose TextField cause infinite loop?
When I create a TextField using a TextFieldValue as it's value, as soon as I type a character it runs in an infinite loop, logging both my debug message before the condition check and 'show(ime(), ...
0
votes
0
answers
42
views
Custom bottom sheet height restriction in fullyExpanded state in jetpack compose
I'm building a fully customized bottom sheet in jetpack compose and i have specific anchor scenarios
enum class BottomSheetValue {
Hidden,
Minimum,
PartiallyExpanded,
Expanded;
...
1
vote
0
answers
78
views
Jetpack Compose AppBar transformed SearchBar
Like the same element as in the video, with the expand animation. Is there anything native?
in jetpack compose and material 3. I found only this implementation:
@ExperimentalMaterial3Api
@Composable
...
2
votes
1
answer
645
views
How to use Hilt DI with WorkerManager in Android?
I want to use a Worker in my Android app (pure Kotlin) to so some background work. I'm using Hilt for dependency injection, but I'm facing some problems when I need to pass a custom object to the ...
0
votes
1
answer
60
views
Jetpack Compose - Cannot make ModalBottomSheet non interactable by the user
I want to make a ModalBottomSheet fully interactable programmatically, and prevent the user from opening and closing it. It seems I have to create the SheetState in a certain way, but I cannot find ...
0
votes
1
answer
372
views
Jetpack Compose: WebView Dark Mode?
How do I have WebView use the dark mode in Jetpack Compose (minSdk=33, compileSdk=35)?
What I get is a WebView that is black-on-white even if everything else is white-on-black; the same kind of ...
1
vote
1
answer
103
views
How to create a calendar date card with a wave effect in Jetpack Compose
I would like to create a calendar date card in Jetpack Compose that closely matches this design, maintaining the same wave patterns and path shapes. My goal is to ensure that the visual elements, such ...
0
votes
1
answer
74
views
Nesting a LazyColumn inside a scrollable Column - Jetpack Compose
I'm trying to nest a LazyColumn inside a scrollable Column in Jetpack Compose. I want the LazyColumn to vary in height with its contents until it reaches a maximum height of half the screen (in other ...
0
votes
0
answers
27
views
Compose LazyRow crash with "Horizontally scrollable component was measured with an inifinty maximum width constraints" [duplicate]
I have an android recycler view inside which I am adding my compose view which will contain the LazyRow of items. This is working correctly with portrait but in case of landscape it is crashing with &...
1
vote
1
answer
174
views
Jetpack Compose sharedBounds inside CenterAlignedTopAppBar crashes on first screen with Uninitialized LayoutCoordinates error
I'm using SharedTransitionLayout in Jetpack Compose to animate elements across different screens. The issue occurs when I use Modifier.sharedBounds inside the title section of CenterAlignedTopAppBar.
✅...
0
votes
0
answers
59
views
Handle GamePad buttons in Jetpack Compose UI
How can I handle gamepad button presses in my jetpack compose app UI?
I have tried to create a custom Modifier.pressable that listen to events and invokes the onPresses argument, but it's rather an ...
1
vote
0
answers
144
views
How to make perfect Pie Chart in android jetpack compose
How to make pie chart code like this, I have used many libraries like MPAndroidChart for it but none of them prevents overlapping of labels
my current approach with MPAndroidChart is
val ds = ...
1
vote
2
answers
540
views
How to change jetpack compose list re-order animation to fade in and out
I have a lazy list in jetpack compose and I'm using animateItem to animate my list
LazyColumn {
items(books, key = { it.id }) {
Row(
Modifier.animateItem(
...
0
votes
1
answer
800
views
How can I restrict font size scaling with Jetpack compose?
Trying to understand how to limit font scaling, from this example here:
Text(
text = "This is resizing text with font scale ${LocalDensity.current.fontScale}",
fontSize = 20.sp
)
On ...
0
votes
2
answers
63
views
How to Create an Android Host App That Loads UI Plugins from External APKs?
I am android devloper I like creating ui i want to showcase my ui in way that i won't have to update app every time i make new ui. I was think thinking of making one host app and every time i make new ...
5
votes
1
answer
302
views
Compose FlowRow and CollectionInfo Semantics for Accessibility
I am using a FlowRow of RadioButton options and trying to set up correct accessibility behavior that will read the collection information (In List, X items), but not sure how to calculate the correct ...
0
votes
0
answers
62
views
Efficiently track bounds of fragments of composables on the screen in android without onGloballyPositioned
I'm working on a multi-modal chat application where users send text requests, and the chatbot responds with text, images, and thumbnails. One of the requirements is to send context information about ...
0
votes
1
answer
65
views
Why animation is not working as expected?
I had tried to make a simple animation using Jetpack Compose that when the button click the text must be displayed. The button will move from left-right with rotation and text will get visible coming ...
1
vote
0
answers
94
views
How do I track low level events for a mouse right click Press and Release on a Jetpack Compose UI element?
I am building an app on Android that is intended to be used with a mouse.
The UI of my app is in Jetpack Compose.
I am familiar with the pointerInput modifier and all the wonderful wrappers put in our ...
1
vote
2
answers
469
views
How to enable swipe gesture to open ModalNavigationDrawer when using a full-screen HorizontalPager in Jetpack Compose?
I'm using Jetpack Compose and I am trying to enable opening a ModalNavigationDrawer via a swipe gesture (from left to right) similar to how Twitter does it. I have a HorizontalPager that occupies the ...
0
votes
0
answers
55
views
Credential Manager doesn't popup on web after saving credential from related application
I'm trying to share credential between my application and my website.
I followed this, to ask the user to save his login / password
val createPasswordRequest = CreatePasswordRequest(
id = ...
0
votes
2
answers
173
views
Recompose an fragment/activity in jetpack after changing the language
I have a code for changing the language of an APP. When I'm using this code, the language does change but not fully. Some parts of the page I'm in is still having the old language. For e.g., if I'm ...
0
votes
2
answers
94
views
Trigger a coroutine when the other is finished
I do have an app where I have to call an endpoint to pull a list of product and another endpoint to pull the list of product type.
The second endpoint only return the list of type but I need to add ...
2
votes
0
answers
32
views
How to compute the verticalScrollRange() for LazyVerticalGrid in Jetpack Compose with different spans?
I'm working with LazyVerticalGrid in Jetpack Compose where I have items with varying spans (e.g., some items take up 1 span, others take up 4 spans). I need to compute the verticalScrollRange() of the ...
0
votes
1
answer
41
views
DropDown menu not clickable when expanded
I have created an app and added a component which is a drop down list. It use to work but I cannot make it work again. When I click on the item, the click is not caught.
The code is as below:
@...
0
votes
1
answer
71
views
How do I iterate over a Map List in LazyRow?
I'm trying to get the images from the CatModel into my LayzColumn. But I don't know how because I have a map list
LazyRow(
horizontalArrangement = Arrangement.spacedBy(8....
0
votes
2
answers
295
views
StickyHeader not following the scrolling in LazyColumn
I am building an app fully compose and used LazyColum + StickyHeader to display the elements I need to. However, the stickyHeader is not moving at the same pace. It stays on screen untli the next ...
1
vote
0
answers
45
views
Provide `ViewStructure` in a Jetpack Compose view
I want to add autofill to an Android application that can connect to self-hosted services. This app uses Jetpack Compose to define interfaces. According to this answer, autofill services are not ...