Where is Android Studio layout preview?
UPDATE 2 (2020-03-16)
The newer Android Studio version changed the location of this button. Now if you want to see the layout design preview you will need to press one of the buttons at the top right of your xml. The button that looks like an image icon will open the design dashboard, while the button next to it will open the split view where the design is placed next to the XML code:
ORIGINAL (2013-05-21)
You should have a Design
button next to the Text
button under the xml text editor:
Or you can use the Preview
button in the upper right corner to add a preview window next to the XML code:
UPDATE:
If you dont have it, then do this: View
-> Tool Windows
-> Preview
Several people seem to have the same problem. The issue is that the IDE only displays the preview if editing a layout file in the res/layout*
directory of an Android project.
In particular, it won't show if editing a file in build/res/layout*
since those are not source directory but output directory. In your case, you are editing a file in the build/
directory...
The Resource folder is set automatically, and can be viewed (and changed) in Project Structure > Modules > [Module name] > Android > Resources directory.
In case that helps anyone, I had the same issue today where the 'design / text' tabs were missing. I had switched to the dark theme and thought maybe that was the issue, so went back to Preferences / Appearance (under IDE settings) switched back to Default Theme, and that reset everything correctly for me. I could also then switch again to Darcula theme and the tabs were still there, so seems like switching themes is a way to reset the IDE windows/tabs.