In the Android Studio design preview, my layout fits perfectly on screen. Even when I played it though AVD
, it fits well. But when I connect my phone with Android studio and run it, it doesn't fit in my phone screen. It seems like centerCrop
is on the whole screen. all layouts have the same problem.
I'm using a Samsung s8+. Preview setting is also Samsung s8+ which Android Studio provides.
At first, I thought that this problem is caused by 18.5:9 ratio of my phone. But in that case, the screen should be cut only at bottom and top. But it seems like centerCrop
is enlarging based on the center?
The screenshot on the left is what I see on the preview and on the right is what I see on my physical phone:
Two Solutions:
确保您的自定义仿真器具有与手机相同的设置(Height,Width,RAM)。
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.