How to set XML and preview to display at the same time in Android studio?


When Android studio is doing program development, in order to see the program running results and modify the errors, it is often necessary to modify the XML and switch to the preview to view the effect. It’s annoying to switch frequently. If you want to display XML and preview interface at the same time, let’s take a look at the detailed tutorial.

Software name:
The latest official version of Android studio v2.2.2.0 (APK application development tool)
Software size:
Update time:
2016-12-03Download now

1. Open any layout file,The design page is displayed by default, click the button in the lower left cornerTextswitch to text page

2. ClickTextright side bar of pagePreview buttonThe layout preview interface can be displayed next to the text.

3、The layout preview page is displayed on the right side of the text page by defaultHowever, its display position can be adjusted.Click the setting button in the upper right corner of the layout preview page,The drop-down setting options are displayed.

4. Move cursor toMove to When setting drop-down options, a new list of options will pop up.When left is selected,The layout preview page is displayedDisplayed on the left side of the text page.The setting methods for other directions are similar.

The above is how to set XML and preview to be displayed at the same time. It’s very simple. Friends who need it can set it themselves.

Relevant recommendations:

What if the Android studio design interface turns gray?

How does Android studio create a new XML file for the selector?

How does Android studio create files related to resources and edit XML?