Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
337 views
in Technique[技术] by (71.8m points)

android studio designer preview: how to include device frame?

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.

The only settings button I see is outside the preview pane, not inside

which only shows these options

How can I make the device frame show? Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...