Reputation: 4075
I'm trying to add support for various DPI screens and failing miserably. I have created the following folders:
values
values-sw320dp
values-sw480dp
values-sw600dp
values-sw720dp
Now, I'd have thought that the Samsung S5 would have picked it's dimens file from the sw720dp folder - given it's resolution is 1080 x 1920
However it appears to be taking it's dimens from sw320dp which results in text that is way too small.
Why does it do this, and can someone provide an authoritative list of sensible values folders to implement.
Upvotes: 3
Views: 454
Reputation: 200130
The resolution of 1080 x 1920 is not in dp
, it is in pixels.
Per https://material.io/devices/, the S5 is an xxhdpi device, i.e., 3 pixels per dp
. This makes the resolution in dp
360 x 640dp, hence why it uses the values-sw320dp
folder.
Upvotes: 4