I have a `Fragment` which contain a `RecyclerView`...
# compose
t
I have a
Fragment
which contain a
RecyclerView
and want to render it in my compose app I’m using
AndroidViewBinding(MyFragment::inflate)
but it wont show unless I put a specific height for it using
Modifier.height
Is there a way to make it show without specifying the height? P/S:
Modifier.onGloballyPositioned
returned the layout height is 0px 🤦
not kotlin but kotlin colored 1
l
Afaik this is the default behavior, why not use .weight(1f) or .fillMaxSize() ?
t
I need it to wrap the content size not filling the whole remaining space. Is there a way to measure its actual size after it’s been laid?
Also fillMaxSize won’t work
l
No idea about this, sorry
t
Thanks for taking your time 🙌
z
Compose should interop with Android view measurements, in most cases. Idk if fragments are weird for some reason. Feel free to file a bug.
And @Lukas Anda no need to use not kotlin but kotlin colored here, this is perfectly relevant to this channel.
l
@Zach Klippenstein (he/him) [MOD] Okay, thanks for letting me know, I thought it is more appropriate to #compose-android channel and does not really go with general #compose channel
z
Technically yea, but it doesn’t really matter. And that’s not what that reactji says anyway