Questions tagged [lazycolumn]

209 questions
1
vote
1 answer

Updating LazyColumn In Card Button Click

I am developing a Question/Answer Quiz App in JetPack Compose. I have the Card as below Card(modifier = Modifier .wrapContentHeight(Alignment.CenterVertically) .wrapContentWidth(Alignment.CenterHorizontally) .padding(10.dp) …
srituts
  • 53
  • 8
1
vote
1 answer

How to add texdfields at runtime and manage those textfields values in android jetpack compose?

I want to create a Rate List application using jetpack compose. Rate List have different items and each item have different price according to weight. For Example Apple(Items) 1kg price is 100Rs and for 5kg price is 400Rs etc. Like apple different…
1
vote
2 answers

Arrange a single item inside a LazyColumn by using weight modifier

I am looking to have a result like this. Two block with 2/3 size and 1/3 size respectively. I am getting the expected result with this code. @Preview(showBackground = true) @Composable fun LayoutCheck() { Column( modifier =…
Shijilal
  • 2,175
  • 10
  • 32
  • 55
1
vote
1 answer

Jetpack compose - is it good idea to throw all items in to LazyColumn?

currently, i have a screen where it has LinearLayout as root viewpager TextView Recyclerview with textview item some other layout in this case which one is better option to go for when migrating to compose in terms of perfomance ? A Column as…
prudhvir3ddy
  • 826
  • 6
  • 14
0
votes
1 answer

I am new to Jetpack Compose. I am adding a LazyColumn to display list of QR Codes but the "items" inside the LazyListScope is accepting onlt Int

I have created the database and the QR Code generation feature is also working properly. Now I want to show the History for which I am using a LazyColumn. But for some reason the 'items' in LazyListScope is not accepting the variable. Below I am…
0
votes
1 answer

isSticky state when using stickyHeader in LazyColumn

LazyColumn(state = lazyListState,) { item {} item {} stickyHeader{ stickState.value = lazyListState.firstVisibleItemIndex >= stickyItemIndex //Some item in here } } When using stickyHeader {}, how can I access…
0
votes
0 answers

How to make multiple lazy columns scroll independently each other in Jetpack Compose?

I want to make multiple LazyColumn scrolled simultaneously in Jetpack Compose. But, It seems that one LazyColumn prevent other LazyColumn to be scrolled. Below screenshots is my composable structure. class MainActivity : ComponentActivity() { …
0
votes
1 answer

Kotlin - extend Interface with extension function, why not working?

I'm trying to understand what is happening inside of the LazyColumn with the interface LazyListScope and its extension function items(List,...). The concept was new to me and I was playing around a little bit with the program. Now, I wonder - why…
0
votes
2 answers

Updating item in a mutableStateList is not triggering recomposition in UI (LazyColumn)

I have been scratching my head over this problem. I have a data class representing items that can be selected(or unselected). data class FilterItem( val name: String, val isSelected: Boolean ) I have created a mutableStateList of…
0
votes
1 answer

Managing nested state for checkboxes with Jetpack Compose

I am facing a weird issue with jetpack compose where I can get a child state to manage itself, or have the parent state manage child state, but not both. In the below example (I removed a lot of positioning/modifier fluff), you'll see that I have a…
0
votes
1 answer

How to fix LazyColumn Composable scrolling problem

I'm trying to embed a horizontally scrollable table within a Composable. However whenever I engage horizontalScrolling the container goes 'blank', as shown. Also figured out that the container or LazyColumn itself has to have a .size to constrain…
0
votes
1 answer

How can I update a LazyColumn's listitems inside an AlertDialog from a ViewModel properly in Jetpack Compose? - Android

I'm trying to make a recipe app for practice that saves Recipes and Ingredients in a ROOM database. The recipes are shown in the main screen, and there is a FloatingActionButton that lets you add a new recipe with ingredients. This FAB opens an…
0
votes
0 answers

LazyColumn weird behaviour on scroll, when activity's window has transparent color

there is my lazy cloumn: LazyColumn { items(20) { Text( text = "hi$it", color = Color.Green, textAlign = TextAlign.Center, modifier =…
mrzbn
  • 497
  • 1
  • 3
  • 15
0
votes
0 answers

Android -> Compose.PullRefresh does not work with mouse/trackpad on chromeOS

This is the logic. that I have: Box( Modifier .pullRefresh(pullRefreshState) .fillMaxSize() .padding(all = 0.dp) .background(color = colorResource(id = R.color.inbox_list_color)) ) { …
rosu alin
  • 5,674
  • 11
  • 69
  • 150
0
votes
0 answers

LazyColumn list position moving in sticky header (Android, Jetpack Compose, Kotlin)

I am developing on moving the list(item) in LazyColumn Composable using Jetpack Compose and Kotlin. The app I am implementing is the TodoList app, and if I explain the function, the item includes text and checkbox composable, and the position of…
박종준
  • 125
  • 1
  • 2
  • 10