1

We are using two different tablets with following display specs:

Tablet A:

Screen size -- 7"; 480 x 800

Taskbar height -- 36px

Tablet B:

Screen size -- 7"; 480 x 800
taskbar height -- 48px

DisplayMetrics.xdpi and DisplayMetrics.ydpi for both tablets are same and equal to 160 and 160.42 respectively. However, DisplayMetrics.densityDpi for tablet A is being shown as DENSITY_LOW while for Tablet B it is being shown as DENSITY_MEDIUM. The folders (for drawables and layouts) accessed by the two tablets match the densityDpi values.

The questions are: 1) How can these two devices have different pixel density? 2) What is best way of structuring folders for resources and layouts in such a situation?

I find the second issue extremely confounding as a genuinely LDPI screen with a smaller size will access resources and layouts from the same folders as Tablet A but will, most probably, the result will be displayed badly.

4

0 回答 0