Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Filter by
Sorted by
Tagged with
0 votes
1 answer
97 views

I want to use SearchBar from Compose, but I need to set another height. However, the problem is that if I do this, then the EditText inside & all the content would remain fixed at the top. I need ...
radus14's user avatar
  • 180
0 votes
1 answer
65 views

How to scroll the list to the bottom when keyboard is shown in Compose? Now I have the following solution: val isImeVisible = WindowInsets.isImeVisible LaunchedEffect(isImeVisible) { if (...
SpiralDev's user avatar
  • 7,381
1 vote
1 answer
269 views

It needs to make a row in the column, the row should have two text items, the second should right align the first text item. And when the first text has longer text content, it should grow up to a max ...
lannyf's user avatar
  • 11.1k
5 votes
1 answer
199 views

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
117 views

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
  • 23.6k
0 votes
0 answers
120 views

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
1 answer
255 views

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
  • 183
1 vote
3 answers
9k views

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
  • 658
1 vote
0 answers
381 views

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
1 vote
0 answers
526 views

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
586 views

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,848
0 votes
2 answers
1k views

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

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,848
5 votes
3 answers
2k views

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
  • 153
0 votes
0 answers
153 views

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,177
0 votes
2 answers
3k views

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,801
9 votes
2 answers
14k views

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
  • 1,298
12 votes
0 answers
1k views

I am trying to create one compose screen with nested scroll behaviour. For that I am using lazyColumn as parent and inside that I do have multiple rows with layRow. val scrollState = ...
nilkash's user avatar
  • 7,576
1 vote
2 answers
4k views

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 ...
Android_programmer_office's user avatar
1 vote
1 answer
366 views

(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 | | ...
JustSightseeing's user avatar
4 votes
2 answers
4k views

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 ...
Lukas Schüler's user avatar
5 votes
1 answer
5k views

I am trying to create a Composable that wraps another content Composable and displays a CircularProgressBar as an overlay on top of it, covering the whole content Composable. I almost got it working ...
BenjyTec's user avatar
  • 12.6k
1 vote
0 answers
1k views

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 ...
Filipe h's user avatar
1 vote
2 answers
3k views

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 ...
LilMoke's user avatar
  • 3,534
4 votes
1 answer
948 views

I'm creating a QR Scanner where the preview view is blur except the centre square part, I was able to blur PreviewView but not able to think of a way to unblur the centre cutout part. AndroidView( ...
Rahul Pawar's user avatar
3 votes
3 answers
1k views

This is the prototype of Row: @Composable public inline fun Row( modifier: Modifier = Modifier, horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, verticalAlignment: ...
ceving's user avatar
  • 24.2k
4 votes
1 answer
2k views

I've been trying to build a list with a Card in it formatted like this: The difficulty here is that the title e.g. "Bread" and ingredient name e.g. "Flour" can be very long and ...
David Aleksanyan's user avatar
53 votes
1 answer
14k views

Is it possible to combine Arrangement.spacedBy(16.dp) and Arrangement.Center in a Row.horizontalArrangement? What I would like to do is to center the content horizontally and also set a default ...
Roberto Leinardi's user avatar
6 votes
3 answers
3k views

I want to chain title and description text centered with respect to image with chainStyle.Packed how to achieve this in jetpack compose. when i use createVerticalChain() its create chain with respect ...
user avatar
31 votes
5 answers
30k views

How can I align the text using Text composable function vertically. Is there a way to do it without having to add another extra view to contain the Text. The textAlign parameter of Text only has the ...
Dan Artillaga's user avatar
21 votes
1 answer
10k views

I'm new in jetpack compose and I'm trying to do a simple thing that I can't achieve it. That I want to do is in the same row align one component, in this case a surface, at the start and the other one,...
S.P.'s user avatar
  • 2,604
6 votes
2 answers
2k views

@Composable fun TopAppBar( name: String, modifier: Modifier = Modifier ) { Row( modifier = modifier .fillMaxWidth() .padding(20.dp, 0.dp), ...
Chinmay's user avatar
  • 504
28 votes
2 answers
21k views

I am trying to scroll down to the position of a specific UI element on clicking a Text. The code for my Text is: Text( "What is autosaving?", ...
Sparsh Dutta's user avatar
  • 3,078
10 votes
1 answer
9k views

I'm using constrainAs with Jetpack Compose to constrain a list of wifi options to the top of the parent and then to the bottom of a text view. As seen from the photo my list isn't being constrained to ...
alfietap's user avatar
  • 2,355
104 votes
7 answers
137k views

I am using Jetpack Compose to create a simple flash card. The idea is that you click the flash card and it will give you the answer. However, I am stuck on a basic problem. Unfortunately... I could ...
PandaPlaysAll's user avatar
74 votes
6 answers
104k views

Is it possible to do weights in Jetpack Compose? For example, I'd like to set it up in such a way that one item is weighted as 1/3 of a layout, and the other takes up the remaining 2/3. In the XML/...
Corey Waldon's user avatar