简体   繁体   中英

Problem supporting multiple resolutions on Android

I'm having a weird problem. I have been testing my app with hdpi resources up until recently. My designer sent over some mdpi assets and now my application is defaulting to the mdpi assets. How can I make sure the hdpi assets are being used for my phone?

your device was defaulting to the hdpi graphics because there were no other graphics available. but since you now added mdpi, your phone has a choice between the 2 and it will choose the most compatible for the device. you can't force your application to use HDPI unless you only supply the HDPI graphics

You cant, the hdpi, mdpi etc are handset attributes. If you design the app correctly you will have an asset hierarchy that will address all screen densities. So I recommend that you focus on that.

To elaborate, for a robust android app, you will have resources in hdpi, mdpi, ldpi and xdpi folders, maybe even ndpi folders, all based on a well defined asset heirarchy. You can read more about it here .

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