简体   繁体   中英

Galaxy S4 picking resource from drawable-sw360dp-hdpi instead of drawable-xxhdpi?

I have following drawable folder inside my app.

drawable
drawable-mdpi
drawable-hdpi
drawable-sw360dp-hdpi
drawable-sw480dp-hdpi
drawable-xhdpi
drawable-xxhdpi

Now S4 is xxhdpi device but it is picking resource from drawable-sw360dp -hdpi. In article in this url http://developer.android.com/guide/topics/resources/providing-resources.html . it is mentioned that it select folder on the basis of highest-precedence qualifier from table of qualifier.

Since some folders have sw qualifier it select those folder and eliminates other and S4 is picking resources from drawable-sw360dp-hdpi because S4 width is 360 dp and it matches that folder but S4 density is xxhdpi , it is ignoring density because sw qualifier is matching? So it prefer sw because it is top above dpi in table of qualifier? Is it true that it is picking resource from folder on the basis of qualifier and not on the basis of denisty as drawable-xxhdpi matches exactly with S4.

So to make S4 pick correct resource do I need to change drawable-xxhdpi to drawable-sw360dp-xxhdpi.

samsung S4 and sony xperiaz doesn't picks up from folder drawable-xxhdpi....!!!!

we made drawable-h900dp folder and corresponding to S4's height dpi equivalent 1920/2=960dpi. since h900 says minimum height is 1800 it picked resourecs from it.

but those resourses got stretched by 2 times... odd behaviour

so we made it as drawable-h900dp-nodpi now resources are being taken and maintaining the original size.

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