Skip to content

Commit 493861d

Browse files
author
Dianne Hackborn
committed
Docs only: DENSITY_TV, not just for TVs any more!
Change-Id: Id70e0bc179ab405fbb7f3b2cda7b75f44ff30b57
1 parent ddbc85c commit 493861d

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

core/java/android/util/DisplayMetrics.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,21 @@ public class DisplayMetrics {
3838
public static final int DENSITY_MEDIUM = 160;
3939

4040
/**
41-
* Standard quantized DPI for 720p TV screens. Applications should
42-
* generally not worry about this density, instead targeting
43-
* {@link #DENSITY_XHIGH} for 1080p TV screens. For situations where
44-
* output is needed for a 720p screen, the UI elements can be scaled
45-
* automatically by the platform.
41+
* This is a secondary density, added for some common screen configurations.
42+
* It is recommended that applications not generally target this as a first
43+
* class density -- that is, don't supply specific graphics for this
44+
* density, instead allow the platform to scale from other densities
45+
* (typically {@link #DENSITY_HIGH}) as
46+
* appropriate. In most cases (such as using bitmaps in
47+
* {@link android.graphics.drawable.Drawable}) the platform
48+
* can perform this scaling at load time, so the only cost is some slight
49+
* startup runtime overhead.
50+
*
51+
* <p>This density was original introduced to correspond with a
52+
* 720p TV screen: the density for 1080p televisions is
53+
* {@link #DENSITY_XHIGH}, and the value here provides the same UI
54+
* size for a TV running at 720p. It has also found use in 7" tablets,
55+
* when these devices have 1280x720 displays.
4656
*/
4757
public static final int DENSITY_TV = 213;
4858

0 commit comments

Comments
 (0)