简体   繁体   中英

Android splash screen for high resolution devices

I need to design a splash screen for my app, but Iam facing issues for high end devices like Nexus 6p.

Ihave samsung s5 with 1080X1920px size which is xxhdpi and nexus 6p with1440 x 2392px size which is also a xxhdpi

when ever i place my splashscreen.png(with 1080X1920 size ) in drawable-xxhdpi 6p is giving slight distortion as the resolution is more in it, it works fine in samsung s5.

since both are xxhdpi screen what is the correct image size i need to place.

Depending on the composition of your splash screen, you may be able to use a 9patch image, which is basically an image with resizable sections configured in such a way that Android can understand them.

There is an overview of what they are at https://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch , and information on how to create one at https://developer.android.com/studio/write/draw9patch.html

If you display the image with scale type CENTER_CROP there should be no distortion. See the documentation for details.

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