Android Studio - view both Text and Design preview of layout

前提是你 提交于 2020-03-17 07:41:13

问题


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?


回答1:


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.

Hope this helps.




回答2:


Click on preview while text is selected.




回答3:


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




回答4:


Design, split, and code selection buttons in Android Studio 3.6.1 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.




回答5:


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.



来源:https://stackoverflow.com/questions/33133589/android-studio-view-both-text-and-design-preview-of-layout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!