https://kotlinlang.org logo
#compose
Title
# compose
m

Mohammad Sianaki

02/21/2022, 1:23 PM
Has anyone used
contentType
in
LazyColumn
? I’m trying to implement a multi type List, but I’m facing serious performance issue
m

mattinger

02/21/2022, 4:46 PM
What type of performance issues are you having? Compose is very janky at the moment in debug builds, so it’s possible that you are experiencing that and should try deploying a release build to a physical device and seeing if you still have issues.
As for the “multi type list”, there’s no such thing with LazyColumn to my knowledge. It just has items, and each item has emitted UI. There’s no real equivalent to the recyclerview approach of row types.
m

Mohammad Sianaki

02/21/2022, 4:49 PM
I’m aware of compose issues with debug builds, I’m facing UI jank when scrolling my list in release build on a physical device
You can use
item
or
items
to emit
LazyRow
in a
LazyColum
to build a “multi type list”
s

Stylianos Gakis

02/21/2022, 10:56 PM
As far as I understand contentType should just be something that is the same (compared with a == probably) for items that emit the same exact composable. But it's true that I haven't found a lot of documentation about it.
436 Views