67 questions
1 vote
0 answers
73 views
How to determine which chips are actually visible in a Jetpack Compose FlowRow with overflow?
I'm building a UI in Jetpack Compose using FlowRow (from accompanist/compose foundation), with a chip list that can overflow (e.g., maxLines = 3 with FlowRowOverflow.expandIndicator). When the chip ...
1 vote
1 answer
120 views
Why is my Jetpack Compose Image taking up all space in the row and hiding the text?
Here are my two previews: @Preview(showBackground = true) @Composable fun RegionsTest1() { PromVendorsTheme { Row( horizontalArrangement = Arrangement.spacedBy(40.dp), ...
1 vote
0 answers
104 views
How to create a LazyVerticalStaggeredGrid that items aligned to start for every even index?
I need to have a LazyVerticalStaggeredGrid that aligns every even item to the left no matter of other which height other items have but while aligning depends height of last 2 items it aligns item to ...
2 votes
1 answer
80 views
Unable to specify weight in Composable with no Column declared in it
I am trying to build a simple calculator using jetpack compose, my composables are: calculator(): this composable composes the whole calculator calculatorRow(): it creates a Row of Buttons When I ...
1 vote
0 answers
73 views
Compose Scaffold does not get the max height of custom bottom bar
I have a custom bottom bar and i want Scaffold to get this bottomBar's max height and give me the padding of it from the bottom so my content is properly placed when there is a scroll for example. ...
0 votes
1 answer
117 views
How do I align an icon in the top left of a Column that has verticalArrangement of Center
As title says, I have a compose Column where I center the contents vertically but I want an icon in top left.
2 votes
0 answers
295 views
How to align a bigger child within a smaller parent in Jetpack Compose?
I have created a Box with a fixed size and it has a child that doesn't respect the parent's constraints. The child uses a requiredSize modifier to do this. Box(Modifier .size(50.dp) .border(2....
1 vote
0 answers
381 views
How to create a custom Layout which will be displayed as floating element in jetpack compose?
I have requirement to create a component which will be displayed by the nested child component but it should not be constrained inside to any it's parent component. And I can position it like top, ...
3 votes
1 answer
2k views
Custom layout doesn't cause parent to wrap content in jetpack compose
So I have a layout with the following structure: The layout is as follows: Card( modifier = Modifier.fillMaxWidth() ) { Row( modifier = Modifier ....
0 votes
1 answer
490 views
Why LazyColumn always seems not showing part of the custom layout view from left and right side?
I have code below which I experiment with LazyColumn and Column on CustomLayoutModifier on Text (or can be on anything). @Composable fun Greeting() { Column( horizontalAlignment = ...
0 votes
1 answer
701 views
Why the constraint offsetting behave like sizing (width/height) while the layout sizing (width/height) behave like offset
I have the following top-level code where a Box is centered on the device @Composable fun Greeting() { Column( horizontalAlignment = CenterHorizontally, verticalArrangement = ...
0 votes
1 answer
384 views
Why adding and subtracting Compose Placeable constraint behave differently?
When I set my pleaceable constraint as below. LazyColumn( contentPadding = PaddingValues(all =64.dp), verticalArrangement = Arrangement.spacedBy(16.dp), ) { val adjust = 32.dp item { ...
5 votes
0 answers
1k views
Jetpack compose DropDownMenu position inside a surface not showing
I have a surface (which acts like a card) and at the right top corner I have menu dots. The idea is that when a user taps the menu dots a drop down menu should appear. The issue I have is that the ...
2 votes
2 answers
1k views
Can a Compose LazyList be scrolled to adjust for keyboard?
I have been wrestling with IME padding/adjustment for my app. I have written a little toy app to try and focus on just the problem. The app presents a scrollable list of cards with info on them, the ...
1 vote
1 answer
4k views
Jetpack Compose Row Item Positioning
I've struggled with this layout, which seems like it should be trivial, but I guess since I'm a somewhat beginner with Compose that I can't quite get it right. All I want to do is have these two ...