Questions tagged [android-jetpack-compose-lazy-column]
78 questions
50
votes
6 answers
Jetpack Compose LazyColumn programmatically scroll to Item
Is there any way to programmatically scroll LazyColumn to some item in the list? I thought that it can be done by hoisting the LazyColumn argument state: LazyListState = rememberLazyListState() but I have no idea how I can change this state e.g. on…

iknow
- 8,358
- 12
- 41
- 68
28
votes
7 answers
Get last visible item index in jetpack compose LazyColumn
I want to check if the list is scrolled to end of the list. How ever the lazyListState does not provide this property
Why do I need this? I want to show a FAB for "scrolling to end" of the list, and hide it if last item is already visible
(Note: It…

Mahdi-Malv
- 16,677
- 10
- 70
- 117
27
votes
1 answer
Android Jetpack Compose Lazy column items with index?
How to access the current item's index of LazyColumn in Jetpack Compose.
LazyColumn {
items(viewModel.list) { item ->
// Here I want to get the index of the item
Timber.d("item - $item")
}
}

Frank Mung No
- 490
- 1
- 4
- 9
13
votes
6 answers
jetpack compose: scroll to bottom listener (end of list)
I am wondering if it is possible to get observer inside a @Compose function when the bottom of the list is reached (similar to recyclerView.canScrollVertically(1))
Thanks in advance.

AbdulMomen عبدالمؤمن
- 19,419
- 17
- 57
- 65
10
votes
2 answers
Jetpack Compose lazy column all items recomposes when a single item update
I'm trying to do some list operations and I've run into the issue of all items recomposing when a single item update.
https://prnt.sc/8_OAi1Krn-qg
My models;
data class Person(val id: Int, val name: String, val isSelected: Boolean =…

pcparticle
- 123
- 1
- 6
8
votes
1 answer
How to prevent LazyColumn from autoscrolling if the first item was moved
I use Jetpack Compose UI to build a simple TODO app. The idea is to have a list of tasks that could be checked or unchecked, and checked tasks should go to the end of the list.
Everything is working fine except when I check the first visible item on…

Andrei Marshalov
- 135
- 6
7
votes
1 answer
How to select multiple items in LazyColumn in JetpackCompose
How to select multiple items in LazyColumn and finally add the selected items in a seperate list.
GettingTags(tagsContent ={ productTags ->
val flattenList = productTags.flatMap {
it.tags_list
…

AndroidRocket
- 418
- 3
- 14
5
votes
2 answers
Performance of LazyColumn with LazyRows inside it
I have a lazy column with lazy rows inside it, like in the image:
I am testing on a 2017 middle-quality phone with Android 9. Release build with R8 enabled.
Scroll performance in rows are pretty good, but in column performance is very low. I am…

mrzbn
- 497
- 1
- 3
- 15
4
votes
0 answers
Compose nestedScrollConnection not being triggered with animated scroll
I've created a collapsible header in Compose with the NestedScrollConnection. Everything works perfectly but one addition had to be made: automatic scrolling to a certain item. The problem I have is that the header (connected using the…

Marc
- 1,094
- 3
- 17
- 38
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…

urSus
- 12,492
- 12
- 69
- 89
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

user19095510
- 53
- 5
3
votes
2 answers
How to implement LazyColumn item impression tracking
I have a lazycolumn with items, and I want to send an event every time one of the items appears on screen. There are examples of events being sent the first time (like here https://plusmobileapps.com/2022/05/04/lazy-column-view-impressions.html) but…

rohan
- 523
- 1
- 5
- 22
3
votes
2 answers
Execute LaunchedEffect only when an item is visible in LazyColumn
I am using a LazyColumn and there are several items in which one of item has a LaunchedEffect which needs to be executed only when the view is visible.
On the other hand, it gets executed as soon as the LazyColumn is rendered.
How to check whether…

Ali_Waris
- 1,944
- 2
- 28
- 46
3
votes
2 answers
How to check visibility of list item in Jetpack Compose
FlatList of React Nativehas a property viewabilityConfigCallbackPairs where you can set:
viewabilityConfig: {
itemVisiblePercentThreshold: 50,
waitForInteraction: true,
}
to detect visible items of the list with threshold of 50% and after…

Marat
- 1,288
- 2
- 11
- 22
2
votes
1 answer
Nesting of Lazy Column in Jetpack compose gives crash, I searched through Internet but I didn't find any solution for the crash?
I have a list of Pair> . Here main list is list of all direcotry name and in each directory there is list of files in it. so In compose I want to design UI design where Folder name followed by its content and after content second…

Shubham kumar
- 25
- 3