From f6d9cd19e28d78fe3f46914959932ea1244b04ed Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Wed, 3 Jun 2015 15:50:48 -0700 Subject: [PATCH] Add DENSITY_360 Add 360dpi as a supported screen density to closer match some hardware's physical specifications. This gives a dp multiplier of 2.25. Bug 19529059 Change-Id: Ibf9c768fba53765ea684ff228d24caf091f27a3e --- api/current.txt | 1 + api/system-current.txt | 1 + core/java/android/util/DisplayMetrics.java | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/api/current.txt b/api/current.txt index c9a8efb2360f7..0467b69e2ae7d 100644 --- a/api/current.txt +++ b/api/current.txt @@ -34002,6 +34002,7 @@ package android.util { method public void setTo(android.util.DisplayMetrics); method public void setToDefaults(); field public static final int DENSITY_280 = 280; // 0x118 + field public static final int DENSITY_360 = 360; // 0x168 field public static final int DENSITY_400 = 400; // 0x190 field public static final int DENSITY_560 = 560; // 0x230 field public static final int DENSITY_DEFAULT = 160; // 0xa0 diff --git a/api/system-current.txt b/api/system-current.txt index 2f26891769dc4..d11fe855ead8d 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -36267,6 +36267,7 @@ package android.util { method public void setTo(android.util.DisplayMetrics); method public void setToDefaults(); field public static final int DENSITY_280 = 280; // 0x118 + field public static final int DENSITY_360 = 360; // 0x168 field public static final int DENSITY_400 = 400; // 0x190 field public static final int DENSITY_560 = 560; // 0x230 field public static final int DENSITY_DEFAULT = 160; // 0xa0 diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java index d0e5b9e5aa333..a36e66cce98f8 100644 --- a/core/java/android/util/DisplayMetrics.java +++ b/core/java/android/util/DisplayMetrics.java @@ -73,6 +73,14 @@ public class DisplayMetrics { */ public static final int DENSITY_XHIGH = 320; + /** + * Intermediate density for screens that sit somewhere between + * {@link #DENSITY_XHIGH} (320 dpi) and {@link #DENSITY_XXHIGH} (480 dpi). + * This is not a density that applications should target, instead relying + * on the system to scale their {@link #DENSITY_XXHIGH} assets for them. + */ + public static final int DENSITY_360 = 360; + /** * Intermediate density for screens that sit somewhere between * {@link #DENSITY_XHIGH} (320 dpi) and {@link #DENSITY_XXHIGH} (480 dpi).