Hi all, is it bad practice to use `weight(1f)` ins...
# compose-android
f
Hi all, is it bad practice to use
weight(1f)
inside a Scrollable Column? I tested the app and it works fine according to my requirements. The app is also not crashing nor lagginggratitude thank you
s
It will basically add up to take up 0 height/width if there is enough scrollable content so that the container does in fact become scrollable. If however the content is not long enough for the container to be scrollable, then the weight will do what you expect and will take up the "remaining" of the space. The one problem you might encounter here is that you'd expect this spacer to take up some space, but it will take up 0.dp in those scenarios. If you want it to take at least 32.dp but also take up the "remaining" space of your container, then you can have two spacers, one with weight and one with the fixed 32.dp size for example
f
Spacer with 0.dp is fine in my case! Thanks for clearing my doubt 🙂