android studio designer preview: how to include device frame?

心已入冬 提交于 2019-12-17 16:32:52

问题


There seems to be tons of answers to the opposite question "how to remove device frame" which instructs user to click the "settings" button inside preview to uncheck "include device frame (if available)". But for me using 2.2.2 on a mac and 2.2.1 earlier, such a button with that option never was available. Out of the box (dmg) Android Studio Designer always only shows the viewport without any device frame.

This explanation of the Designer settings suggests that option is only available if "include device frame" option is selected, but for me that is a chicken & egg issue. I'm using the default Nexus 6P AVD which already has "enable device frame" selected. The only settings button I see (which is outside the preview pane, not inside) only shows these options.

How can I make the device frame show? Thanks


回答1:


In Android Studio 2.2 and above you can enable and disable designer preview device frame as follows

1- Click on designer preview window

2 - press F button from your keyboard

this will enable and disable the designer preview device frame every time you press F button from your keyboard. this works for me. I hope its work for you as well.

It does not work with latest version of Android Studio 3.1




回答2:


In version of Android Studio 3.3 go to the AVD Manager under the Actions tab there an icon that looks like a pencil, this lets you edit the device name and the device frame

scroll down to the Device frame, untick the box, click finish shut down the virtual device and restart



来源:https://stackoverflow.com/questions/40460227/android-studio-designer-preview-how-to-include-device-frame

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