Questions tagged [lazycolumn]

209 questions
4
votes
1 answer

When Can I Use A Composable in the Scope of a LazyList or Column?

I have built a number of projects and components with Jetpack Compose. I've read the docs and other tutorials, sites, and posts on StackOverFlow. I am unclear about when I am allowed to use composables and composable functions inside of another…
petestmart
  • 500
  • 11
  • 27
4
votes
3 answers

LazyColumn with header item in card and remaining items in card

Using compose LazyColumn I would like a card for the header item, and a single card that contains the remaining items. LazyColumn() { item { Card() { // header card} } // would like all items in single card Card() { // cannot do this,…
lostintranslation
  • 23,756
  • 50
  • 159
  • 262
4
votes
1 answer

LazyColumn with Image from bitmap source blinking / flashing

I'm new to Jetpack Compose. I am currently developing a chat application. I ask the user to choose an image from the gallery or take a picture from the camera. Then I save the file Uri to the database and then listen to the list of all messages.…
4
votes
2 answers

Jetpack Compose - Restore LazyColumn Scroll State

I have a LazyColumn that contains multiple LazyRow. In old terms, nested RecyclerView. My problem is, LazyColumn does not restore scroll state when move to a new composable (Different tab). But inner LazyRows restore their states. For example, open…
3
votes
4 answers

Compose Android Test Lazy Column Not Detect All The Children

I have a LazyColumn inside a Composable, I want to check every item in that LazyColumn is exist. This is my composable: (Note: Actually in my real case the each item has different component, I just make it similar for simplify the…
3
votes
1 answer

LazyColumn, how to add window insets padding to my padding?

I have a LazyColumn where I have a contentPadding = PaddingValues(16.dp) Now, I want to add navigation bar height to the bottom padding, as to achieve the "edge to edge" effect so contentPadding = WindowInsets.navigationBars.asPaddingValues() But…
3
votes
0 answers

AsyncImage in LazyColumn Kotlin Compose

I have a list of photos from the internet and I want to load them into a LazyColumn. The problem is that some of them are loading faster than others so the photos appear in random order. Here is the code: val state =…
3
votes
1 answer

How to correctly upload image to an item in LazyList in Jetpack Compose?

I would like to let user add image to each item (Card) in LazyColumn. But it seems that images are getting deleted on recomposition. How can I fix that? @Composable fun PhotoUpload( ) { val imageUri = remember { …
Paul Sizon
  • 247
  • 4
  • 12
3
votes
1 answer

LazyColumn item, Unit cant be called in this context by implicit receiver

I have the next code, everything is fine except that I need to put my second AnswerOption in a lazyverticalGrid. Which i cant do it, because its inside a lazycolumn this is the code @Composable fun AssessmentScreen( onClose: (String, String) ->…
user10625391
  • 177
  • 3
  • 19
3
votes
1 answer

In compose, why modify the properties of the List element, LazyColumn does not refresh

When I modify the properties of the objects in the List, the UI does not update my code: @OptIn(ExperimentalFoundationApi::class) @Composable fun ContactCard( ) { var stateList = remember { …
3
votes
0 answers

With AdjustResize LazyColumn TextFields on the bottom won't open keyboard

Created a LazyColumn with textFields and it seems to have issue with "android:windowSoftInputMode="adjustResize"parameter. When clicking a text field that needs to move up so it won't be hidden behind keyboard, causes issues when using AdjustResize…
3
votes
1 answer

Highlight only one Card in Compose through selection

i have a Compose LazyColumnList which shows the content (from a List) in single cards. I want to highlight the selected card only. Now when i select another card, the first card stays highlighted. Here is the code: ... LazyColumn( …
3
votes
1 answer

Jetpack Compose LazyColumn reverse display

native composable column with elements a, b and c: a b c how can you reverse arrangement to: c b a in android jetpack compose
3
votes
1 answer

LazyColumn is showing wrong display when deleting an item

I'm creating an app that, among other things, enables the user to add a Consumer, and then remove him later. The consumers are shown in cards with a remove button in the end. Adding a consumer works fine. However, when I try to remove a consumer,…
3
votes
1 answer

When adding lazy column inside another lazy column in android jetpack compose it shows error

How to add a lazy column inside another lazy column in jetpack compose like below screenshot.(The inner list size maybe vary) @Composable fun SingleItem() { LazyColumn(modifier = Modifier .fillMaxWidth() ), …
Abijith C
  • 43
  • 1
  • 5