Is it possible to add contentPadding to Horizontal...
# compose
l
Is it possible to add contentPadding to HorizontalPager from Accompagnist ? Like it's done for LazyRow
Here I would like a content Padding for the HorizontalPager to be correctly aligned with the rest of the UI. Adding manual padding as a modifier will crop the pager. That's why I'm looking for something like contentPadding from LazyRow
f
LazyColumn( contentPadding = set your own here? )
l
You mean adding it at the top level LazyColumn ? Just tried it and it cropped the content 😕 it seems only on LazyRow it's working without cropping the pager 🤔
f
No sorry, add it to the lazyrow
l
I'm using a Pager not a LazyRow, that's the issue here. I would like to add contentPadding to HorizontalPager
f
Wrap the pager in a Box/Boxwithcondtraints and add padding to that box
l
That would still be an issue, I will have the right start padding but the pager will scroll being the padding
here is a video with a LazyRow, when you set the contentPadding you have a padding without making hte list scrol behing the padding
that's what I'm looking for with HorizontalPager
t
I did this by adding padding to the item composables and ignoring
itemSpacing
l
I did this by adding padding to the item composables and ignoring 
itemSpacing
That's what I was doing before. But by doing do
itemSpacing
is much more than the design spec I have 😕 I will try to request this feature into the repo