141 questions
0
votes
0
answers
32
views
LazyColumn flingBehavior problem in Jetpack Compose
I used the following code in Jetpack Compose to position items in the center of the screen and I succeeded, but when I click on the item, the item moves down and the flingBehavior effect disappears. ...
0
votes
0
answers
28
views
AnchorPosition in getRefreshPage is random when PagingData is invalidating during LazyColumn scroll
I am using Paging3 to show list of transaction from DB. All the transaction data is fetched from backend service and saved into DB in background. For my transaction list DB is the only source of truth....
0
votes
1
answer
70
views
Nesting a LazyColumn inside a scrollable Column - Jetpack Compose
I'm trying to nest a LazyColumn inside a scrollable Column in Jetpack Compose. I want the LazyColumn to vary in height with its contents until it reaches a maximum height of half the screen (in other ...
1
vote
1
answer
285
views
Why is my LazyColumn item's clickable modifier not working in Jetpack Compose?
I'm working on a Jetpack Compose app where I have a LazyColumn displaying a list of items. Each item is wrapped in a Surface with a clickable modifier, but clicking the items doesn't seem to work. I'...
0
votes
0
answers
91
views
StickyHeader with pagination in Jetpack Compose
I tried adding a stickyHeader as suggested in this answer. However, the performance is not close to the production-ready code because of the loop as my list is a bit bigger.
Here is my attempt:
...
3
votes
1
answer
692
views
How to compose items that are offscreen with LazyColumn or LazyRow?
This is a share your knowledge, Q&A-style question to create a follow up answer to create a Lazy list(Column, Row, Grid) that can compose more items than default behavior allows which is the next ...
0
votes
1
answer
593
views
Why does LazyColumn with inner .animateItem() not animate the LazyColumn height properly on item changes when not full height?
I want the LazyColumn height to be exactly the same as the items while still animating them via .animateItem(). With the code below, it looks nice but it uses .fillMaxHeight() which doesn't fit my use-...
1
vote
0
answers
147
views
Jetpack Compose BottomSheetScaffold with LazyColumn rendering too many items and occupying extra space
I am developing an Android app using Jetpack Compose. In my app, I am using the Morfly Advanced Bottom Sheet for convenience, which is very similar to the Material3 BottomSheetScaffold as it is built ...
1
vote
1
answer
105
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 ...
3
votes
0
answers
107
views
Lazy Column/Row are not passing the touch events below | pointerInteropFilter is not working
After updating to the latest compose-bom 2024.09.00, Lazy Column/Row are not passing touch events to below composables.
Code Block:
@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun ...
1
vote
1
answer
273
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 ...
1
vote
0
answers
46
views
LazyColumn inside HorizontalPager using the same LazyPagingItems reference but with different filters applied
I have a screen with two tabs to display sweet and salty foods but they are the same paging items source with different filters - for this example it's going to be a boolean, when it's true the ...
3
votes
2
answers
2k
views
How do you animate the insertion of an item into a list?
I've developed a simple Android application where you can insert new items into a list on a button press. New items pop up instantly, it looks sloppy. I've tried to animate their insertion, but it's ...
0
votes
1
answer
35
views
ClickableText composables as a list's elements and use them in lazy column, to list all customers, and when clicked, navigate to other screen
I want to show the list of customer's names in lazy column, so i created a list variable and used clicableText composables inside it, so that each item can be clicked, then i want to use it inside a ...
2
votes
2
answers
442
views
How do I add a top offset to sticky headers?
In Jetpack Compose, I have a LazyColumn with multiple stickyHeader items. By default, the stickyHeader items will stick to the top of the LazyColumn as you scroll down. Is there a way to alter this ...
1
vote
0
answers
200
views
Android Jetpack Compose, Combining LazyColumn, StickyHeader & Tablayout list breadcrumbs
I have a complex list based UI that is based around scroll events. It's laid out in the following order
TextView
Tablayout --> Each tab is a textview of a LazyList section header
LazyList
...
0
votes
0
answers
57
views
Android Compose LazyColumn change some values
How do I reflect changes in some values in the List to LazyColumn in real time?
val postDataList = postViewModel.postDataList.collectAsLazyPagingItems()
LazyColumn(
modifier = Modifier
...
1
vote
0
answers
459
views
Android Compose (TV) wrong focus when TTS is on
Using jetpack compose to create an APP for TV platforms and I've been trying to create a Vertical List of Horizontal Lists using a LazyColum/LazyRow having a enter Focus (first item Top Left), when ...
1
vote
1
answer
147
views
How to make a grouped LazyColumn items for API data JSON?
I want to make API data appear in groups inside a LazyColumn.
I've achieved my purpose when the required API data is a List of Lists of Objects response, but I don't have any idea how to make it work ...
1
vote
3
answers
2k
views
How to automatically scroll LazyColumn when the keyboard goes up or down in Android
I am making a chatting app with android compose.
Usually, when you scroll freely within the chat window and press the text input window to bring up the keyboard, the chat at the bottom of the screen ...
0
votes
3
answers
2k
views
Compose LazyColumn with Paging3 scrolls up when item updated
I am using Paging3 with RemoteMediator for getting remote data, saving it in Room database and showing it in my Composable screen. On item click, opens detail screen and can update the data of that ...
2
votes
0
answers
164
views
JetPack Compose: Glitch UI, nested LazyRows with pagination
I have LazyColumn with nested LazyRow lists.
Each row use Flow<PaginData<UiObj>> for showing data.
LazyColumn() {
items(
items = showcaseRefList,
...
2
votes
1
answer
2k
views
LazyColumn animateItemPlacement doesn't work
I have a problem, animateItemPlacement in my LazyColumn simply doesn't work, code:
val laps = stopWatchViewModel.getLapsStates().collectAsState(initial = emptyList())
LazyColumn(
modifier = ...
0
votes
1
answer
1k
views
ViewModel does not update list of Object after changes. How to fix this?
I have a ViewModel class:
class ItemsModel : ViewModel() {
private val _tasks = MutableStateFlow<List<TaskItem>>(listOf())
val tasks = _tasks.asStateFlow()
fun onTaskDone(...
3
votes
0
answers
344
views
Animate LazyColumn items content size in Compose
I have a LazyColumn with items that have subsections, that appear and disappear on click.
I want to animate the items content size change: when I click on an item, I want to reveal its subsection (or ...