LazyRow has a contentPadding argument, but Row doe...
# compose
c
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
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
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
Cool. I wonder why they went ahead and added contentPadding specifically for LazyRow then?
a
Because in
LazyRow
you can’t control the order of scroll modifier and other modifiers so the behavior is different.
👍 1
c
OooOOooH! Makes sense. Cheers. That's actually super insightful!
a
I was answering similar question here https://issuetracker.google.com/issues/197727780#comment4