Search code examples
androidscreen-resolution

Dimensions always picked up from higher resolution directory for example values-xxhdpi for all the phones


I have separate values directories like values-mdpi, values-hdpi, values-xhdpi and values-xxhdpi

But in all screen resolution phones, dimens are picked from values-xxhdpi if I delete values-xxhdpi then it picks up from values-xhdpi

I have tried it on large and xlarge phones

Could be an old and common question but I didn't find any working simple solution


Solution

  • values and values-mdpi are virtually the same. If you want to create a differentiation create values-sw320dp which will be taken into account for mdpi.

    You can refer to this SO for more details.