https://kotlinlang.org logo
#compose
Title
# compose
h

Hrodrick

09/08/2023, 1:43 PM
Hi everybody, hope you are doing good! I’m having a simple issue. My preview’s content is taller than the default preview’s height. Is there a way to always display the full content of the preview? I see there is a
heightDp
parameter that allows me to make it bigger, but I would like something more dynamic that just displays the whole composable. Any ideas?
a

ascii

09/08/2023, 2:12 PM
No. It's either the
heightDp
param, or supplying a larger device. You could also run an interactive preview that'll let you scroll (assuming your UI is setup for that).
h

Hrodrick

09/08/2023, 2:14 PM
will need to use
heightDp
then. The component is scrollable, but on any change it scrolls to the top so it is not useful for previewing the development. it would be good if the Compose team add that option, like we have in
Modifier
with .
wrapContentHeight
h

Hrodrick

09/08/2023, 2:41 PM
ahh excelent, exactly what I am looking for. Thanks for the links!
👍 1
3 Views