Treate DENSITY_560 as XXXHIGH or XXHIGH?

722 views Asked by At

In the documents, android says:

/**
 * Intermediate density for screens that sit somewhere between
 * {@link #DENSITY_XXHIGH} (480 dpi) and {@link #DENSITY_XXXHIGH} (640 dpi).
 * This is not a density that applications should target, instead relying
 * on the system to scale their {@link #DENSITY_XXXHIGH} assets for them.
 */

Android think its a XXXHIGH(4X) screen.

But I have another function call getResources().getDimensionPixelSize(R.dimen.line_list_item_height), it returns 3X height, it is so strange, how to fix this?

  • Device is Nexus 6p
  • Compile sdk version is 23
  • I use a viewpage inside a listview, so must calculate a height to prop up the viewpage.
0

There are 0 answers