I want to declare two different values for a widget, having two test devices:
480x800 mdpi
display320x480 mdpi
Both are mdpi
, but I need a way to name another values-mdpi
folder that will contain smaller values for the second device. I tried several names based on this page, but everytime the smaller device assumes the same values of the bigger one. Advices?
So you want to distinguish between different screen sizes, use the smallest width qualifier
http://developer.android.com/training/multiscreen/screensizes.html#TaskUseSWQuali
res/layout-sw600dp //e.g. all tablets that are > 7"
The Smallest-width qualifier allows you to target screens that have a certain minimum width given in dp. For example, the typical 7" tablet has a minimum width of 600 dp, so if you want your UI to have two panes on those screens (but a single list on smaller screens), you can use the same two layouts from the previous section for single and two-pane layouts, but instead of the large size qualifier, use sw600dp to indicate the two-pane layout is for screens on which the smallest-width is 600 dp: