Compose question: I wanna have an edge-to-edge app and I want to add the navigation bar height as bottom padding to a scroll list so that the last item doesn't get cut. Right now, I'm checking if
item == lastItem
inside the loop and updating the bottom padding accordingly. Is there a way of doing what we did in xml files by adding
android:clipToPadding="false"
so that the padding was always added at the end of the scroll or is checking item by item the Compose Way™️? 🤔
t
Timo Drick
07/27/2020, 1:05 PM
There is a clipToPadding modifier. Some Compose functions using them. When you do not use them than it works the same like before i think.
w
William Barbosa
07/27/2020, 1:19 PM
I can't seem to find a
clipToPadding
modifier. I saw a
clipToBounds()
(with is a wrapper to
drawLayer(clip = true)
), so I tried
drawLayer(clip = false)
but that did not work 🤔
t
Timo Drick
07/27/2020, 2:14 PM
Yes sorry. "clipToBounds()"
Timo Drick
07/27/2020, 2:21 PM
In genereal i did not had to do anything that it works. Just make sure no component in the hiearchy call clipToBounds.
Timo Drick
07/28/2020, 10:02 PM
@William Barbosa did you solve your problem. Just found code from me which work as you discribed: