Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why value is taken from value-mdpi if I'm working with Galaxy Nexus

Tags:

android

I have dimens.xml defined in both values and values-mdpi folders. I'm expecting the value for Galaxy Nexus device (which is xhdpi) to be taken from values but actually it is taken from values-mdpi. Why is that so? Thank you.

like image 713
Eugene Avatar asked Apr 15 '13 15:04

Eugene


1 Answers

You must create a folder for values-xhdpi.
values is the default folder, but if you specify a folder with a qualifier (here, values-mdpi) the system will use the best apropriated folder with a qualifier (here values-mdpi)

If you add a values-hdpi folder, it will be used over values-mdpi for a screen at xhdpi.

If you add a values-xhdpi folder, it will be used over the previous two folder for a screen at xhdpi.

like image 181
Pauland Avatar answered Nov 14 '22 22:11

Pauland