Search code examples
androidxmlandroid-studioandroid-layoutpreview

Android studio 3.2.1 Layout editor preview disappearing when a tab is closed


I am using Android Studio 3.2.1 and when I close a tab that is not the current one, the content of the preview window simply disappears, e.g.

Preview to close "Cupon" tab Normal

After close "Cupon" tab enter image description here


Solution

  • just switch the XML editor to tab Design, on the bottom left of the screen ...

    there you have Design or Blueprint and even Design + Blueprint.

    and I've just tried to reproduce the issue with Android Studio 3.3.0:

    • had to close all XML files before the Preview panel closed.

    • nothing happened, when I've closed an associated Java class.

    possible solutions:

    • updating Android Studio to 3.3.0 might get you rid of that annoyance.
    • also try to correct this one light-bulb marker on the ConstraintLayout.

    to be honest... I've never used the Preview panel until now :)