android studio designer preview: how to include de

2019-01-18 20:14发布

问题:

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