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

Sam

12/09/2020, 10:26 PM
what’s the best way to set a fixed
dp
spacing between each item in a
LazyColumnFor
? There seems to be
contentPadding
as a param but no obvious
itemSpacing
1
h

Halil Ozercan

12/10/2020, 7:08 AM
I'm not sure about the latest LazyColumnFor API but wouldn't
Arrangement.spacedBy
work?
Copy code
@Deprecated(
    "Use LazyColumn instead",
ahahaha. Ok, forget my suggestion
a

Andrey Kulikov

12/10/2020, 11:05 PM
in alpha08 you have to add it manually. You can use
LazyColumn
and
itemsIndexed
inside or just
LazyColumnForIndexed
and add spacer if index != 0. in alpha09 you would be able to apply
Arrangement.spacedBy
s

Sam

12/10/2020, 11:06 PM
thanks for the heads up, right now we are doing manually but
Arrangement.spacedBy
will be a welcome [re]addition!