Unable to find UI designer in the new Android Stud

2019-02-05 19:56发布

I have downloaded the new android studio that has been released recently. I am unable to find the UI design preview for the xml, as it is in eclipse. Any help or suggestions on that?

1条回答
女痞
2楼-- · 2019-02-05 20:29

Open a xml layout file:

  • at the bottom, you have two tabs: Design/Text enter image description here
  • in design mode, you see the preview directly
  • in text mode, the preview is (by default) on the right, toggled by a 'Preview' button in the rightmost bar

enter image description here

You can also show/hide it with View > Tool Windows > Preview

EDIT

Attention: 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 be displayed if editing a file in build/res/layout* since those are not source directory but output directory.

The Resource folder is set automatically, and can be viewed (and changed) in Project Structure > Modules > [Module name] > Android > Resources directory.

查看更多
登录 后发表回答