问题
Is it valid to use drawable-swdp- like drawable-sw720dp-xhdpi?
Below is my scenario: My Acer iconia tab A501 (10") has a resolution of 1280x800 and density mdpi(160dp). It is expected to take the resource from drawable-sw720dp-mdpi. But the resource is being taken from drawable-sw720dp-xhdpi.
I have following folders: drawable-sw720dp drawable-sw720dp-mdpi drawable-sw720dp-hdpi drawable-sw720dp-xhdpi
is this the way this qualifier is to be used?
or Is the density already considered while calculating the smallest width.So should i be having only one folder of the format: drawable-sw720dp
回答1:
I had the same problem and tracked this down. I believe there was a bug in ICS (Android 4.0.3 for me) where non-XHDPI devices take XHDPI values. Because most XHDPI devices started off in Jelly Bean (Nexus 4, Nexus 10), qualifying the folders with -v16 at the end (instead of nothing or -v14) solves the problem. 10" non-XHDPI devices running Jelly Bean do not have this bug so it seems to work. This does mean any XHDPI devices pre-JB will be broken, but I'm okay taking that risk.
回答2:
Tablets of resolution like 1280x800 gets their resources from drawable-xhdpi of course if the device is of the density hdpi.
So designing for tablet to for different resolution you will have to create different folders of images with appropriate resolution name.
I think this will help you more . http://developer.android.com/guide/practices/screens_support.html
thanks
来源:https://stackoverflow.com/questions/12494670/using-smallest-width-configuration-qualifier