Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
1 vote
0 answers
47 views

Android TV : LazyColumn and focus

I started a new app dedicated to Android TV platform. I try to display an Activity containing 2 or 3 columns using LazyColumn components. Each column are displayed correctly with the data in my lists....
arnouf's user avatar
  • 820
3 votes
1 answer
114 views

How to scroll to the last entry in a LazyColumn so it is displayed at the top and not at the bottom?

I'm building a chat interface in Jetpack Compose using a LazyColumn. When a user sends a new message I want their latest message to appear at the top, and older messages should scroll up automatically....
Pawandeep Singh's user avatar
0 votes
1 answer
74 views

How do I forget or reset lazyListState in Jetpack Compose?

I have issue that I cannot resolve - forgetting list state. I have single LazyColumn which has some items and I also have list of categories users can choose from eg. All, Favourite, Subscribed etc. ...
Cuyer's user avatar
  • 76
0 votes
1 answer
66 views

Sticky header stuck in top Jetpack Compose

I wanted to make header sticky header for relevant header. Which is expandable. data class Section( val header: String, val items: List<String> ) val sections = listOf( Section(&...
Surendra's user avatar
3 votes
1 answer
134 views

LazyColumn only updates data from Room after scrolling

After navigating to the screen, the data is retrieved through ViewModel and Room, but LazyColumn won't update, only after scrolling. I'm using a data class to create a list of sections called ...
JaimeHdz's user avatar
2 votes
1 answer
84 views

State being lost when LazyColumn items move between item blocks

It seems like LazyColumn is losing state on rows when moved between different item calls even though they're keyed. It was my understanding that if two items existed with the same key the composable ...
Henry Twist's user avatar
  • 6,071
1 vote
1 answer
130 views

LazyColumn + TextField (not in bottomBar) with imePadding: extra padding when soft keyboard is opened

I am struggling around with this extra padding and provided here a small sample code. What is causing the extra padding added between the text field and the software keyboard (when opened)? Expected ...
rsp's user avatar
  • 109
1 vote
1 answer
95 views

How to change the size of multiple Composable elements at once without triggering recomposition without using animate*AsState?

I'm using Jetpack Compose and have a LazyColumn that displays a list of Card items. When the user performs a onLongClick on one of the cards, a selection mode is triggered: A selection icon appears on ...
Ahmad Njres's user avatar
1 vote
2 answers
88 views

Android how can I fill the remaining space above a specific item in a Jetpack Compose LazyColumn? [duplicate]

I have a LazyColumn in Jetpack Compose and I want one of the items (let’s call it a “highlighted block”) to always sit at the bottom of the visible viewport, even when the list is short. In a regular ...
Нурик Курбанов's user avatar
0 votes
0 answers
34 views

touch-transparent LazyColumn

I want to make a LazyColumn that will overlay the main ui and ignore user's touches so user will interact with main ui. how can I do that? I've tried to make LazyColumn unclickable but it didn't help ...
xto ya's user avatar
  • 1
0 votes
2 answers
145 views

Can't nest a LazyColumn inside a HorizontalPager

I need to nest a lazycolumn inside a horizontalpager, and I need the lazycolumn to have a verticalScroll(scrollState) to remember the current scroll between screen/orientation changes. I created this ...
NullPointerException's user avatar
1 vote
1 answer
77 views

How to avoid lazy column index duplication after item swap

I want to make some item swap mechanism in LazyColumn items. For this I have used itemIndexed but after a swipe, index numbers becomes the same. For example if I swap first item with second the item ...
Surendra's user avatar
0 votes
0 answers
125 views

Video in LazyColumn

I am working on an android application but I am not very familiar with jetpack compose. I want to display videos as items in a lazy column but some videos don't load and just display a black view or ...
Maxime DELESCOT's user avatar
3 votes
1 answer
62 views

Jetpack Compose LazyColumn – Stack Scrolling effect

I’m trying to implement a stack scrolling effect in Jetpack Compose using a LazyColumn. The idea is that the topmost item remains anchored while the items below scroll up and stack on top of it. ...
Gopikrishnan S's user avatar
2 votes
1 answer
361 views

How Can I Call Another Composable within an Item in a Lazy Column with Animation?

I'm still learning compose/kotlin and have come up with a problem that seems very common, but I can't find a solution. I have a LazyColumn with animation--that works great for making additions and ...
SMBiggs's user avatar
  • 11.8k
3 votes
1 answer
78 views

Ensure that clicking one item expands just this item in a LazyVerticalGrid layout

I want to implement a UI in Jetpack Compose where I have a LazyVerticalGrid. When I click on a single grid element, it should expand and display a detailed list of the (initially hidden) sub-items of ...
Tirumal Phutane's user avatar
0 votes
1 answer
319 views

Custom focus on item of lazyrow androidtv jetpack compose

so i have a jetpack compose tv project and on the home screen i have a tvlazycolumn and inside it i have item{} having multiple of these : if (resultItem.thumbnailType?.name.equals( ...
Priyanshu Raj's user avatar
-1 votes
1 answer
76 views

LazyColumn Recomposed when selected to pass url to AsyncImage

New to Jetpack compose, can someone explain why when i select an item in LazyRow and pass that url to the Image it will recomposed the whole row again? HOw should i be using the movieSelector variable?...
intel3's user avatar
  • 1
-1 votes
2 answers
129 views

How to set a drawable object instance as a background of a LazyColumn?

I mean a Drawable generated dynamically, not a file from res/drawable. I tried setting it as a background of the modifier, but it doesn't accept a Drawable instance object. In Java, it was done like ...
NullPointerException's user avatar
2 votes
1 answer
112 views

Unable to update the value of Basic Text Field

I was building an app the uses Basic Text Field. When I try to update the value of Basic Text Field, it won't work unless you recompose it. val textX = remember{ mutableStateOf("Text")} ...
Aman's user avatar
  • 86
2 votes
1 answer
568 views

How to fix crash with "Vertically scrollable component was measured with an infinity maximum height constraints"?

When I'm trying to use Lazy elements with my data list application are crashing. This crash has next scenario: Calling NavHost for screen with Lazy provokes little freez and restart app. After ...
Pavlo Muravyov's user avatar
1 vote
1 answer
104 views

Making Tabs with scrollable content scroll alongside parent composable - IllegalException: Infinity maximum height

I have a composable screen which has some content, then a TabRow, which holds different screens (depending on the selected tab). The tab screens contain scrollable data and this is shown using a ...
muoki_D's user avatar
  • 409
3 votes
1 answer
2k views

Expand and collapse LazyColumn items with animation in Jetpack Compose

I am using stickyHeader with LazyColumn, and I want to expand and collapse the items under each header when the header is clicked, with smooth animations. I've implemented this behavior using ...
Ali Asjad's user avatar
  • 2,205
2 votes
2 answers
96 views

How to align specific children in a LazyColumn?

How can I align horizontally a particular children in a LazyColumn? it worked perfectly using Column, but it doesn't work in LazyColumn because I can't import Modifier.align for each particular item ...
NullPointerException's user avatar
1 vote
1 answer
272 views

Jetpack LazyColumn verticalArrangement Top not grouping sparse items at top of column

I have an app using LazyColumn. On my device, when there are insufficient items to fill the column, it's vertically spacing them equally with large gaps in between, even though I've specified ...
BobDoolittle's user avatar
  • 1,892
1 vote
0 answers
40 views

I have 2 lazyrows with cards , scrolling first is smooth , but scrolling the 2nd one starts recomposition and hangs the row

Jetpack compose In my app's homescreen there are 2 lazyrows containing same itemCards and same content , when testing on my phone when i scroll right on the first row its smooth and ok but when i ...
realHKV's user avatar
  • 11
1 vote
0 answers
183 views

Custom Scroll Behavior for Overlapping. LazyColumn Jetpack Compose

I need to implement custom scrolling behavior involving a LazyColumn on a page. I'll break down the explanation into three stages for clarity. Simplified, it looks like this: 1) Initial Position: The ...
glllobys's user avatar
3 votes
2 answers
483 views

AsyncImage (Coil) Caching not working inside LazyColumn

I am having a composable named ProjectCard. Inside that, I have an AsyncImage composable to retrieve project's icon from Firebase Storage (in case it is supposed to be already uploaded there). In the ...
Sujal Kumar's user avatar
  • 1,204
1 vote
1 answer
105 views

get data from room and IllegalArgumentException: Key "968031" was already used

In my application I get the list of films by api and can add them to the list of favourites which is stored in the database room. So on the screen with the list of favourite films when I try to delete ...
alexxelo's user avatar
0 votes
1 answer
459 views

Fill max width in horizontally scrollable lazy column in Jetpack Compose

I want to have a vertical lazy list of items where each item take parent width when horizontal scroll isn't available, otherwise max IntrinsicWidth among all children. I know roughly how to do this ...
Reosfire's user avatar
1 vote
0 answers
77 views

nestedScroll modifier not working as expected in compose

I was trying to achieve a lazy column with custom behavior. When the user pulls the lazy column after they reached the limits, I would show a refresh indicator by using the offset. The problem is, ...
Farid Guliyev's user avatar
-1 votes
1 answer
303 views

How to change the SnapshotStateList in Kotlin Compose? But not just visually but internally [closed]

I want to recompose a LazyColumn after I change it's List. I found a solution but it is not working as I expected. Now the LazyColumn does recompose but on every change the SnapshotStateList use the ...
jetberrocal's user avatar
6 votes
0 answers
446 views

Lazy Column with Scrollable Gradient background in Jetpack Compose

I'm working on a Jetpack Compose app having a Scaffold layout. My layout includes a title, a tab bar, and a LazyColumn. I want to create a gradient background that scrolls with the LazyColumn content ...
Bhoomi Vaghasiya's user avatar
0 votes
1 answer
40 views

LazyColumn items key not responding to my code in Kotlin

I am making a change in my List in the LazyColumn and added a key to the items property expecting to refresh the LazyColumn with the new List. But the LazyColumn does not refresh. What do you suggest? ...
jetberrocal's user avatar
2 votes
0 answers
66 views

How to apply AnimatedVisibility and animateItemPlacement together?

I am using androidx.compose:compose-bom:2024.06.00. The items of a LazyColumn are animated at the launch of the screen: @Composable fun SampleList(samples: List<Sample>) { val state = ...
JJD's user avatar
  • 52.7k
0 votes
1 answer
49 views

Avoid verticalArrangement spacing when child item is not added on LazyColumn

Currently, we are developing an app using SDUI. In which, on the parent screen mapper, we are placing Scaffold and LazyColumn. On the child level widget mapper, we are placing the items. We have ...
Viks's user avatar
  • 1,584
-1 votes
1 answer
138 views

Box lose shape while scrolling LazyRow

I have a problem, when i scroll my LazyRow, boxes which going out from it lose their shape. I am using a modifier.clip(RoundedCornerShape(20.dp)) and if item is visible in row it clips, but if not it ...
Егор Сауткин's user avatar
0 votes
1 answer
166 views

How to compatible with two different list for LazyColumn/LazyRow?

I have a Custom Composable Calendar, here I try to add a functionality to switch between month view and week view. The point of the code is below: LazyRow { items( key = { page -> state....
Fan Applelin's user avatar
0 votes
1 answer
392 views

Jetpack Compose: LazyRow Scroll Percentage?

I am trying to implement a scroll indicator on LazyRow. Ideally it would transition smoothly while scrolling, but I read that it is not possible because we only have access to the ...
Felipe Ribeiro R. Magalhaes's user avatar
0 votes
1 answer
644 views

Two LazyColumn on one screen with common scroll

I need to implement two LazyComuns on one screen, one below the other (by clicking on an element in the top list, it will go to the bottom and vice versa), and the screen should have 1 common scroll, ...
Sunbey13's user avatar
  • 467
2 votes
0 answers
100 views

jetpack compose - shared scrollstates with lazyrow and columns

Im able to get my lazyrows on the right to vertically scroll with my lazycolumn on the left. The lazyrow will vertically scroll individually but when i try to get only the multiple lazyrows to scroll ...
Jason Kobischka's user avatar
1 vote
0 answers
59 views

Android how to control item animation direction? RecyclerView + LazyColumn

i want to know how to achieve list item animation like this (video here)? in the video, the animation is quite special, generally speaking, if you scroll up the list, the item animation is downwards, ...
Tan Telephone's user avatar
1 vote
2 answers
954 views

Display different composable item in Multi type Lazy Column after every 5th Item in Jetpack Compose

I have two lists, number list of length 200 and and alphabet list of length 26. Both lists have different composable items to show them i.e NumberItem() and AlphabetItem(). I want AlphabetItem() to be ...
CodingDevil's user avatar
0 votes
1 answer
342 views

How do I move a lazy Columns contents up with the keybaord? Compose

So I am trying to make a text messaging app as a learning project. I have the text messages uploaded from firebase and loaded into a lazy column, I also have a textfield that you use to send and type ...
dom Snip MrSnowmanson's user avatar
0 votes
1 answer
2k views

Jetpack compose - load more data or pagination, LazyVerticalStaggeredGrid/LazyColumn disappears

I am implementing a pagination or load more data, whenever LazyVerticalStaggeredGrid/LazyColumn reaches the end/last item. Everything works as expected however, when the data load more function, the ...
Dnyaneshwar Patil's user avatar
1 vote
2 answers
2k views

Android Jetpack Compose - Saving a LazyListState's firstVisibleItemIndex in one Composable Function for another Function to scroll to

Scenario: I have two similar Composable functions that display similar lists of data via LazyColumns, each having their own rememberLazyListState variables. @Composable fun ListA(listData: List<...
MajinKenn's user avatar
  • 109
0 votes
0 answers
62 views

Android LazyColumn OutOfMemoryError

Android LazyColumn OutOfMemoryError To display all font styles in the font folder(res/font) with LazyColumn: font folder(res/font) has many ttf file. @Composable fun TextTtfLearn(){ val context: ...
ITGuoKe's user avatar
1 vote
0 answers
55 views

Application throws an IllegalStateException with LazyColumn, but I have no nested scroll content

When navigating from the Settings screen to the Language screen, which contains one LazyColumn of three rows, it throws this exception: IllegalStateException: Vertically scrollable component was ...
Mahmoud Nabil's user avatar
1 vote
1 answer
45 views

Kotlin/Compose: Why won't my lazyColumn scroll?

I stuffed it full of things, but can't get to the ones past the screen. Been watching youtube videos, asking chatGpt, etc, and can't figure it out. New to coding; sorry if this is an inefficient ...
Vopiscus's user avatar
1 vote
1 answer
631 views

Lazy Column's ScrollToItem Does Not Work As Expected

I am trying to scroll my LazyColumn to the last item automatically when the keyboard appears. However, the code below that is suggested in the other StackOverflow discussions works inconsistently as ...
H3m4d's user avatar
  • 777

1
2 3 4 5 6