Hi ! I am creating a custom composable, and would ...
# compose
l
Hi ! I am creating a custom composable, and would like to get available width/height from the given modifier : is it possible ? My goal is to implement a kind of
FlowLayout
using the
Layout
composable. But for this to work, I need the available width.
t
There is
FlowRow
and
FlowColumn
in Accompanist. You can give them a try.
👍 1
l
Thank you very much 🙂 I'll try it
z
Definitely use the ones in accompanist if possible. But for future reference, this sort of thing is what the
Layout
composable is for. Also
fillMaxSize()
is shorter than
fillMaxWidth().fillMaxHeight()
.
👍 1
l
Yes, I managed with FlowLayout from Accompanist. Also, I'm going to use
fillMaxSize()
instead of
fillMaxWidth().fillMaxHeight()
. I just forgot to check that 🙂 Thank you 🙂