Not sure if doing something wrong? Building a com...
# compose
a
Not sure if doing something wrong? Building a complex UI with maps, scrolling, scale, images, etc ...
@Preview @Composable
85% of the time does not render anything ... emulator and device work perfect! Anything to be done to make
@Preview
work better?
Right now have to put each small piece into it's own
@Preview
and that works ... but would be nice to be able to render the whole UI ... wonder want can be done?
a
Please report repro cases for preview issues and we can take a look at them
a
OK ... but there are no setting in Android Studio that might need to be set, changed?
a
I don't think so, but @nosuid would be the one to ask for certain
a
OK ... sometimes have to replace the Composable view with a simple
Text("hi")
to get the
@Perview
working, than flip back and it works ... funny. Just wondering if the community had any thoughts on the matter?
r
Preview won’t work for anything that uses surface view or texture view
☝️ 1
So maps for instance won’t work
✔️ 4
a
Spending 20% to 30% of my coding time trying to get
@Preview
to show up ... 1. Have to make the Preview as simple as possible by removing most of the components. 2. Get the preview to render the simple view 3. Then start putting the components back one by one till rendering the full view ... Open to any suggestion about how to improve / fix this workflow 🙂 !? Yes ... Yes we can use the emulator or a real device but I would like to have @Preview in my workflow ...
s
Are any of your composables accessing network or disk?
a
No ... what is interesting is the
@Preview
will ultimately render correctly... but have to sneak up on it 🙂 Building it one
@Composable
at a time till it is fully rendered ... that is why wondering if doing something wrong? Because it will eventually render correctly ... might just be my machine / Android Studio config?
s
Sounds like a bug in the preview system. +1 to filing whatever you can share
👍🏽 1
a
OK, but I think it's just me ... 1. No one else is complaining. 2. It ultimately does render ... just have to build the
@Preview
in steps ... Will keep working with it and if it gets too painful ... will file an example :-)