Questions tagged [android-compose-layout]
30 questions
1
vote
2 answers
Jetpack Compose Constraint Layout Constraints not linking as expected
I'm using constrainAs with Jetpack Compose to constrain a list of options.
To the left of the text there is a space, I believe this is caused by the fact that I constrain the text box to the start to the parent and the end to the start of the…

LilMoke
- 3,176
- 7
- 48
- 88
0
votes
2 answers
Android Compose contraintLayout has a text inside, which if it's long -> it will go out of it's parent
This is my code:
@Preview
@Composable
private fun composable(){
ConstraintLayout(
modifier = Modifier
.padding(all = 8.dp)
) {
val (title, type) = createRefs()
Image(
painter =…

rosu alin
- 5,674
- 11
- 69
- 150
0
votes
2 answers
Prevent Text overlapping button in Compose Android
I created the view as below:
@Composable
fun DynamicMessageBanner(
title: String,
message: String,
clickableText: AnnotatedString,
onClickableTextClicked: () -> Unit,
onCloseClicked: () -> Unit
) {
Card(
modifier =…

Long Dao
- 1,341
- 4
- 15
- 33
0
votes
0 answers
Android MotionLayout, how can I change it's height?
How can I change the height of my motionLayout, when swiping.
With my current code, I can only translate a view (but then I will remain with grey there)
I need to modify it's size, as this header is used in multiple fragments, including some…

rosu alin
- 5,674
- 11
- 69
- 150
0
votes
0 answers
How to set lineHeight as multiple of default in Jetpack Composable?
I have the following code. As you can see, the lineHeight on the Text composable is being set to a specific SP. I think it would be better however if I could multiply the default lineHeight by a float such as 1.2f so that I know I'm always making…

Adam
- 2,167
- 5
- 19
- 33
0
votes
0 answers
How to override/customize Material theme with Jepack / Compose?
Material theme restricts setting height on search bar but we want to reduce it because it looks too fatty per our design system
Material theme restricts increasing height of the topbar (default height is 56dp) and it also does not go well with our…

Vineet Kapoor
- 8,249
- 1
- 11
- 14
0
votes
2 answers
Nested Scrolling in Android compose
I have a Column and inside the Column, I have a Spacer with a specific size and a LazyColumn.
What is happening now is that when I want to scroll, First LazyColumn starts to scrolling, and when it reaches the end, the Column starts scrolling to the…

Ehsan
- 2,676
- 6
- 29
- 56
0
votes
0 answers
OutlinedTextField having too much space when trailingIcon is added. How to wrap its text as wrap content(Android compose)?
When I add OutlinedTextField with trailingIcon, unnecessary space is added in between, I don't want this to be added. I am using the below code.
OutlinedTextField(
// Eg (CH) +41
value = "Text value",
modifier = modifier
…

Mohammed Uzair
- 145
- 1
- 11
0
votes
2 answers
Jetpack compose snackbar not displayed at bottom of screen
I tried below code and I observe snackbar is not displayed at bottom of screen.
My task is to display snackbar on click of button.
I wrote code related to display button in a column in function DisplaySnackBarOnClik()
The code to display snackbar is…

Android_programmer_office
- 3,588
- 8
- 40
- 53
0
votes
1 answer
different alignments in compose row
(I'm pretty new to compose, so this might be a dumb question, beware :D)
I'm trying to achieve a layout that looks like this:
--------------------------
| Text1 |
| Text2ABitSmaller +|
| …

JustSightseeing
- 1,460
- 3
- 17
- 37
0
votes
0 answers
Jetpack Compose [ ModalBottomSheetLayout + BottomSheetScaffold + Scaffold] - Help Needed
I have a requirment in my jetpack compose app where i need to display modal bottom sheet and persistent bottom sheet and bottom navigation
How can i use all these three in a single screen
I have tried this layout based on this reference
I have below…

Chandra Shekhar
- 3,550
- 2
- 14
- 22
0
votes
0 answers
Is there a way to use Compose element on MobileApp that is meant for WearOS
I have been developing the mobile app Kotlin/Jetpack Compose for Android and I wanted to make custom composable to bend. I have seen that there is CurvedRow in androidx.glance.wear. The issue with it is since it is not ment for MobileOS the Applier…
0
votes
2 answers
Jetpack Compose responsive size in ConstraintLayout - Dimension.fillToConstraints overwriting .sizeIn, .widthIn, .heightIn Modifier
Im trying to have a composable scale inside a ConstrainLayout until a specified max size (usually by setting the .sizeIn, .widthIn or .heightIn Modifier) is reached or the borders of the constraints are reached.
Using only .sizeIn, .widthIn or…

Lukas Schüler
- 149
- 1
- 8
0
votes
0 answers
how to scroll to the center of a LazyRow item?
The LazyRow LazyListState has the method animateScrollToItem which scrolls to the end of a list item
I want to scroll to the center of the listItem.
I can do that by passing a scrollOffset to the animateScrollToItem, something like listItem.width /…

Filipe h
- 3
- 2
0
votes
2 answers
How to specify Arrangement.SpaceEvenly in a BottomAppBar?
This is the prototype of Row:
@Composable
public inline fun Row(
modifier: Modifier = Modifier,
horizontalArrangement: Arrangement.Horizontal = Arrangement.Start,
verticalAlignment: Alignment.Vertical = Alignment.Top,
content:…

ceving
- 21,900
- 13
- 104
- 178