141 questions
-1
votes
0
answers
45
views
LazyColumn flingBehavior problem in Jetpack Compose [closed]
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. ...
1
vote
0
answers
58
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....
0
votes
0
answers
32
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
0
answers
36
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
...
0
votes
1
answer
76
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 ...
3
votes
1
answer
71
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.
...
1
vote
1
answer
290
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
1
answer
121
views
LazyRow non-observable firstVisibleItemIndex?
I'm tring to find max() on a subset of initial data before laying out an item of a LazyRow. The subset will consist of only visible items and I need to read firstVisibleItemIndex without triggering ...
0
votes
0
answers
93
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
142
views
ModalBottomSheet in LazyColumn contains wrong data
I have a list with a few records. Every record has a city, country, date and id (its primary key). In dao, then repository I have function which accepts id. Finally display list it's fine, but problem ...
3
votes
1
answer
706
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
747
views
Sticky header doesn't stay at bottom of screen when LazyColum list of items is small
I am implementing a chat app using a LazyColumn. I've created this with reverseLayout = true because I want the LazyColumn to automatically scroll to the last message when the view and keyboard first ...
0
votes
1
answer
600
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-...
0
votes
0
answers
101
views
How to fix that LazyColumn always swallows mouse clicks, even when no items are visible?
I have this code and I want to always display an area which displays notifications in a corner of the window. Here, I have the issue that LazyColumn always swallows any clicks, regardless if any items ...
1
vote
0
answers
148
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
0
answers
121
views
Go to a specific item in LazyColumn with index using Paging3 on initial load
I am building a social media app that has a profile page. On it, the user can browse their posts from a vertical grid list. Each post has an id(UUID), authorId(UUID) and an image. When the user clicks ...
1
vote
1
answer
112
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 ...
1
vote
1
answer
317
views
How to switch focus from ModalNavigationDrawer to LazyColumn on Android TV using Jetpack Compose?
I am using Jetpack Compose for Android TV. For navigation drawer I use ModalNavigationDrawer. One of items in drawer is Home.
Here are two scenarios:
When I press Home in navigation drawer, it opens ...
3
votes
0
answers
113
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
3
answers
919
views
How to make a specific item in a LazyColumn occupy full screen width in Jetpack Compose?
I'm using a LazyColumn with a maximum width of 600.dp in Jetpack Compose. I want one specific item in the list to stretch and occupy the full screen width. Is there a way to achieve this without ...
1
vote
1
answer
277
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
1
answer
253
views
LazyColumn with key, when showing keyboard it is hiding last item
I am trying to implement a chat screen that works the same way as the JetChat compose sample. However when I modify the code to use a Flow I am getting an issue
The issue is that when working with a ...
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 ...
0
votes
0
answers
101
views
Jetpack Compose LazyVerticalGrid bug re-rendering all elements when clicking on an element
Jetpack Compose LazyVerticalGrid Recompose Entire List on Item Click
I am working on an Android project using Jetpack Compose to create a movie list application. I want to update the posterPath of a ...
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 ...
1
vote
1
answer
440
views
Scrolling to lazyColumn item with the item key and not the item index
I built a complex lazyColumn composable that mimic a card (indeed, I need to have a list of cards containing potentialy many items each, and nesting a LazyColumn in a Card is not possible (due to the &...
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 ...
4
votes
1
answer
545
views
Automatically scroll up the lazy column to display the full height of the card when expanded
This code does not work as expected. I want lazy column to automatically scroll up to display the entire height of the card when expanded.
val listState = rememberLazyListState()
val coroutineScope = ...
2
votes
2
answers
443
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
45
views
Is it possible to implement nested sticky headers with Jetpack Compose?
I want to implement nested sticky headers with Jetpack Compose.
Jetpack Compose already supports Sticky Headers.
But I can't find way to implemented nested headers.
See requirement demo:
1
vote
0
answers
201
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
...
-1
votes
2
answers
2k
views
Error with LazyColumn: "Asking for intrinsic measurements of SubcomposeLayout layouts is not supported"
I'm getting the following error:
java.lang.IllegalStateException: Asking for intrinsic measurements of SubcomposeLayout layouts is not supported. This includes components that are built on top of ...
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
69
views
Why is LazyColumn's scroll super slow?
It's so slow, it's almost unusable. Release build doesn't make much difference unless the the outerLists size is around 2
Tried: My searches did not yeild anything i can undertand. I tried looking ...
1
vote
0
answers
465
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 ...
0
votes
0
answers
254
views
How can I properly handle nested scrolling in VerticalViewPager with a LazyColumn inside?
I'm trying to simulate a launcher app. It has a main main screen and an apps drawer. I've implemented this with a VerticalViewPager: page 0 is the main page and page 1 is the app drawer. That way, I ...
1
vote
1
answer
149
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 ...
0
votes
1
answer
40
views
View API games grouped by league id only got first league with itemIndexed
I'm trying to get matches by date from a football API and show them grouped by league.
So, I've made a mutable list in ViewModel to store every match item with the fixtureId as its unique identifier. ...
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
1
answer
360
views
Compose: LazyColumn crash in when proguard enabled
I am using the below code to create an infinite scrollable list in compose android. I am detecting the last item and then making a network request to get the next items and then adding them in the ...
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 ...
1
vote
0
answers
59
views
LazColumn not scrolling to the bottom of the items list with Compose content into chained element into ConstraintLayout
I'm sorry for the long title, but it's a little difficult to explain.
I have a LazyColumn Composable into a FragmentContainerView. This container at the same time into a ConstraintLayout, sharing the ...
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,
...
1
vote
0
answers
754
views
Using SnapshotStateList with LazyColumn: adding new items causes IllegalArgumentException key was already used
I have a basic SnapshotStateList that I add and remove items from. It's stored in a MutableStateFlow along with the rest of the UI state for this screen, and exposed as a StateFlow to the composables, ...
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
2
answers
288
views
LazyColumn displaying a list of custom composables (and a Coursera example solution) does not work
I am new to Android Development and I just wanted to implement a LazyColumn with some custom composable inside (while doing the Coursera Meta Android Development course). Unfortunately, every time I ...
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(...
0
votes
1
answer
780
views
CheckBox State is not changing in jetpack compose LazyColumn items()
I have a LazyColumn in which items() exist that holds 5 checkboxes, and the state of these can be controlled by a single parent variable as well as with a specific variable. The code is below:
val ...
3
votes
0
answers
350
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 ...
3
votes
0
answers
357
views
LazyColumn can't be scrolled vertically if there's an inner LazyRow which is currently being scrolled/flinged horizontally
given LazyRow inside LazyColumn.
when I start to scroll LazyRow horizontally
when I lift my finger off the screen (so the list keeps scrolling)
when I try to scroll up-down (not left-right)
then I ...