Android Studio - view both Text and Design preview of layout
Android StudioAndroid Studio Problem Overview
In Android Studio, how can I view both the text and design preview of an XML layout side by side.
I could see it by default when I installed Studio, but now that is gone, and I'm not sure why. I can only see or the other.
How do I re-enable it?
Android Studio Solutions
Solution 1 - Android Studio
Open your [whatever].xml
. At the bottom you'll see Design
and Text
. Select Text
. If you still can't see the actual layout, only xml, then select "Preview
" which is located at the right of the window, between Gradle
and Maven Projects
.
Solution 2 - Android Studio
Click on preview while text is selected.
Solution 3 - Android Studio
At first, select your desired .xml
layout from the Project tab
then use Code, Split and Design
buttons to switch between the views. (Android Studio 3.6)
Code - Display only XML part
Split- Display XML and design both
Design- Only design part
Solution 4 - Android Studio
It appears that in Android 3.6.1, the buttons to select Design, Split, or Code have been placed in the upper right of the XML layout screen.
Solution 5 - Android Studio
Solution 6 - Android Studio
You can split the tab by right-clicking on the tab and selecting either Split Horizontally
or Split Vertically
. Then, you can select the Design
tab on one and the Text
tab on the other.