Ash

    Ash

    1 year ago
    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?
    Adam Powell

    Adam Powell

    1 year ago
    Please report repro cases for preview issues and we can take a look at them
    Ash

    Ash

    1 year ago
    OK ... but there are no setting in Android Studio that might need to be set, changed?
    Adam Powell

    Adam Powell

    1 year ago
    I don't think so, but @nosuid would be the one to ask for certain
    Ash

    Ash

    1 year ago
    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

    romainguy

    1 year ago
    Preview won’t work for anything that uses surface view or texture view
    So maps for instance won’t work
    Ash

    Ash

    1 year ago
    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 ...
    Sean McQuillan [G]

    Sean McQuillan [G]

    1 year ago
    Are any of your composables accessing network or disk?
    Ash

    Ash

    1 year ago
    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?
    Sean McQuillan [G]

    Sean McQuillan [G]

    1 year ago
    Sounds like a bug in the preview system. +1 to filing whatever you can share
    Ash

    Ash

    1 year ago
    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 😃