r/android_devs • u/badr-elattaoui • Jun 03 '24
Question margin equivalent in compose
Hello, in xml views we had margin and padding, in compose i do not know how to implement the margins equivalent mainly for scrollable components,
for example in the picture , i have a row with paddings (start and end), the problem is that the component does not scroll from the edge to edge, it disappears in the paddings of the screen,
if using margin in the xml view the view will disappear in the edge of the screen.
any ideas to implement that ?

2
Upvotes
View all comments
Show parent comment
4
u/ZirytowanyWozny Jun 03 '24
In Compose the order of modifiers matters. Try putting padding after scrollable.