Skip to main content

Questions tagged [android-compose-layout]

The tag has no usage guidance.

android-compose-layout
5 votes
1 answer
58 views

How do I make a Text composable take up x% of the Row's width when there's a IconButton in the row?

I have a Row that has an icon button on the left, then 16dp padding, then a Text that takes up the remaining width in the Row, and finally on the right, another Text that should take up 25% of the ...
Toomany Bees's user avatar
0 votes
1 answer
47 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.
georgiecasey's user avatar
  • 22.9k
0 votes
0 answers
55 views

Managing complex state tree with Compose and LazyList

I want to rebuild a highly interactive RecyclerView based list with a Compose LazyList. The list is divided into categories, and these categories represent required options for a single selection. ...
user1743524's user avatar
3 votes
0 answers
58 views

Is there any way to use widthIn and weight in Jetpack Compose?

I have a screen with a 2 by 2 grid of rectangles. I want the rectangles to fill all available width only if the width of the square is 120dp. The width would not exceed 120dp even if there is possibly ...
gmatcat's user avatar
  • 185
1 vote
2 answers
3k views

How to convert all content of a composable to Bitmap in Android Jetpack compose?

I am trying to convert all the content of a LazyColumn to bitmap, and then export it to a pdf file. I did find this library to take screenshots of what is showing but not for all the content. Content ...
Stevie's user avatar
  • 541
0 votes
0 answers
159 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, ...
Jeevan Rupacha's user avatar
0 votes
0 answers
679 views

Updating a Compsable outside of the compose function using a flow

I am working on a project with list-based menu options. These menu items interact with each other. For example, you could be customizing a pizza, and for a specific deal you get 3 free toppings. ...
user1743524's user avatar
1 vote
0 answers
231 views

I want to add Figma Linear gradient to Jetpack Compose Linear Gradient

I use a Figma design to develop a android app using Jetpack Compose. I want to add a linear gradient to a button like in Figma design. This is my Jetpack compose code. When I use this code the ...
Ramod Sasanga's user avatar
0 votes
2 answers
224 views

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() ...
rosu alin's user avatar
  • 5,810
0 votes
2 answers
803 views

Prevent Text overlapping button in Compose Android

I created the view as below: @Composable fun DynamicMessageBanner( title: String, message: String, clickableText: AnnotatedString, onClickableTextClicked: () -> Unit, ...
Long Dao's user avatar
  • 1,351
1 vote
0 answers
207 views

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 ...
rosu alin's user avatar
  • 5,810
3 votes
2 answers
994 views

draw round corners in canvas with drawArc

I'm trying to create a pie chart in Jetpack Compose. I'm trying to make corners round for each Pie in the Chart. But, I'm having issues making corner rounds. I tried using cap = StrokeCap.Round in ...
Abp's user avatar
  • 123
0 votes
0 answers
91 views

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 ...
Adam's user avatar
  • 2,097
-1 votes
2 answers
2k views

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 ...
Ehsan's user avatar
  • 2,751
5 votes
2 answers
9k views

how to align button bottom center in jetpack compose?

I've been trying to align a button in Column from the bottom to the center for a while, but I couldn't succeed. hear is my code: NutritionHabitsScreen @Composable fun NutritionHabitsRoute( ...
NewPartizal's user avatar

15 30 50 per page