Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which comes first, values-sw or values-dpi?

I want to know which has the highest priority, sw or dpi, as you all know I can provide some android resource folders according to both of them, for example there is the res/value folder which can be provided according to the device smallest-width or device density in the form of res/values-sw600dp and res/values-hdpi respectively, So, if I have a device which will match these two, which value would it take? the one in the hdpi or the one in the sw600dp.

like image 822
Muhammed Refaat Avatar asked Sep 18 '25 09:09

Muhammed Refaat


1 Answers

This table lists all of the qualifiers in order of precedence.

The smallest-width qualifier has higher precedence than the screen pixel density qualifier.

You may also be interested in the How Android finds the Best-matching Resource documentation.

like image 155
Bryan Herbst Avatar answered Sep 20 '25 23:09

Bryan Herbst