简体   繁体   中英

Android Studio Preview is different from the real device

I have installed an AVD for my Samsung Galaxy S7 Edge. When I look to a layout at the android studio preview it fits the screen perfect. But it looks different on the real phone.

Device resolution is also at 2560x1440

What is the problem?

Screen settings AVD:

在此处输入图片说明

Preview settings Android Studio:

在此处输入图片说明

Screenshot Phone:

在此处输入图片说明

You are using a RelativeLayout with too many Views to fit the screen. Either you want to use ConstraintLayout to set the Views in a direct relation to each other or you put a ScrollView around your root layout. Either case there is only so much space to fill.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM