LazyRow has a contentPadding argument, but Row doesn't (even though you can make Row scrollable).
Why is that? Or is there another way you're "supposed" to apply contentPadding in a Row?
c
Chris Sinco [G]
11/18/2021, 3:56 AM
I think just
Modifier.padding
passed in is the way. I don't know the specifics for LazyRow/Column but maybe @Andrey Kulikov can add insight
a
Albert Chang
11/18/2021, 4:05 AM
Yeah, standard padding modifier will work. Note that if your row is scrollable and you want the behavior of `LazyRow`’s
contentPadding
, you need to put the padding modifier after
horizontalScroll()
modifier.
➕ 2
c
Colton Idle
11/18/2021, 5:14 AM
Cool. I wonder why they went ahead and added contentPadding specifically for LazyRow then?
a
Albert Chang
11/18/2021, 5:21 AM
Because in
LazyRow
you can’t control the order of scroll modifier and other modifiers so the behavior is different.
👍 1
c
Colton Idle
11/18/2021, 8:44 AM
OooOOooH! Makes sense. Cheers. That's actually super insightful!