在文档中,android 说:
/**
* 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 认为它是 XXXHIGH(4X) 屏幕。
但是我有另一个函数调用getResources().getDimensionPixelSize(R.dimen.line_list_item_height)
,它返回3X高度,太奇怪了,如何解决这个问题?
- 设备是 Nexus 6p
- 编译sdk版本为23
- 我在列表视图中使用视图页,因此必须计算一个高度来支撑视图页。