/frameworks/base/core/java/android/util/ |
D | DisplayMetrics.java | 131 public float density; field in DisplayMetrics 201 density = o.density; in setTo() 218 density = DENSITY_DEVICE / (float) DENSITY_DEFAULT; in setToDefaults() 220 scaledDensity = density; in setToDefaults() 225 noncompatDensity = density; in setToDefaults() 262 && density == other.density in equalsPhysical() 281 return "DisplayMetrics{density=" + density + ", width=" + widthPixels + in toString()
|
D | TypedValue.java | 179 public int density; field in TypedValue 327 return value * metrics.density; in applyDimension() 473 density = other.density; in setTo()
|
/frameworks/base/core/java/android/view/ |
D | ViewConfiguration.java | 265 final float density = metrics.density; in ViewConfiguration() local 268 sizeAndDensity = density * 1.5f; in ViewConfiguration() 270 sizeAndDensity = density; in ViewConfiguration() 275 mMinimumFlingVelocity = (int) (density * MINIMUM_FLING_VELOCITY + 0.5f); in ViewConfiguration() 276 mMaximumFlingVelocity = (int) (density * MAXIMUM_FLING_VELOCITY + 0.5f); in ViewConfiguration() 277 mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); in ViewConfiguration() 319 final int density = (int) (100.0f * metrics.density); in get() local 321 ViewConfiguration configuration = sConfigurations.get(density); in get() 324 sConfigurations.put(density, configuration); in get()
|
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/ |
D | NavigationBar.java | 29 …public NavigationBar(Context context, Density density, int orientation) throws XmlPullParserExcept… in NavigationBar() argument 30 super(context, density, orientation, "/bars/navigation_bar.xml", "navigation_bar.xml"); in NavigationBar() 45 loadIcon(back, "ic_sysbar_back.png", density); in NavigationBar() 46 loadIcon(2, "ic_sysbar_home.png", density); in NavigationBar() 47 loadIcon(recent, "ic_sysbar_recent.png", density); in NavigationBar()
|
D | StatusBar.java | 33 public StatusBar(Context context, Density density) throws XmlPullParserException { in StatusBar() argument 34 super(context, density, LinearLayout.HORIZONTAL, "/bars/status_bar.xml", "status_bar.xml"); in StatusBar() 44 loadIcon(1, "stat_sys_wifi_signal_4_fully.png", density); in StatusBar()
|
D | CustomBar.java | 63 protected CustomBar(Context context, Density density, int orientation, String layoutPath, in CustomBar() argument 92 Density density = densityInOut[0]; in getIcon() local 95 pathOut[0] = "/bars/" + density.getResourceValue() + "/" + iconName; in getIcon() 100 if (d != density) { in getIcon() 113 protected void loadIcon(int index, String iconName, Density density) { in loadIcon() argument 119 Density[] densityInOut = new Density[] { density }; in loadIcon() 122 density = densityInOut[0]; in loadIcon() 129 bitmap = Bitmap_Delegate.createBitmap(stream, false /*isMutable*/, density); in loadIcon()
|
D | TitleBar.java | 31 public TitleBar(Context context, Density density, String label) in TitleBar() argument 33 super(context, density, LinearLayout.HORIZONTAL, "/bars/title_bar.xml", "title_bar.xml"); in TitleBar()
|
D | FakeActionBar.java | 31 public FakeActionBar(Context context, Density density, String label, String icon) in FakeActionBar() argument 33 super(context, density, LinearLayout.HORIZONTAL, "/bars/action_bar.xml", "action_bar.xml"); in FakeActionBar()
|
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/ |
D | BitmapFactory_Delegate.java | 52 final int density = opts.inDensity; in finishDecode() local 53 if (density == 0) { in finishDecode() 57 bm.setDensity(density); in finishDecode() 59 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in finishDecode() 67 float scale = targetDensity / (float)density; in finishDecode() 100 Density density = Density.MEDIUM; in nativeDecodeStream() local 102 density = Density.getEnum(opts.inDensity); in nativeDecodeStream() 116 density); in nativeDecodeStream() 130 bm = Bitmap_Delegate.createBitmap(is, true, density); in nativeDecodeStream()
|
D | Bitmap_Delegate.java | 94 public static Bitmap createBitmap(File input, boolean isMutable, Density density) in createBitmap() argument 99 return createBitmap(delegate, isMutable, density.getDpiValue()); in createBitmap() 112 public static Bitmap createBitmap(InputStream input, boolean isMutable, Density density) in createBitmap() argument 117 return createBitmap(delegate, isMutable, density.getDpiValue()); in createBitmap() 131 Density density) throws IOException { in createBitmap() argument 135 return createBitmap(delegate, isMutable, density.getDpiValue()); in createBitmap() 434 int density, Parcel p) { in nativeWriteToParcel() argument 549 private static Bitmap createBitmap(Bitmap_Delegate delegate, boolean isMutable, int density) { in createBitmap() argument 555 density); in createBitmap()
|
/frameworks/base/graphics/java/android/graphics/ |
D | BitmapFactory.java | 344 final int density = value.density; in decodeResourceStream() local 345 if (density == TypedValue.DENSITY_DEFAULT) { in decodeResourceStream() 347 } else if (density != TypedValue.DENSITY_NONE) { in decodeResourceStream() 348 opts.inDensity = density; in decodeResourceStream() 496 final int density = opts.inDensity; in decodeStream() local 498 if (density != 0 && targetDensity != 0) { in decodeStream() 499 scale = targetDensity / (float) density; in decodeStream() 523 final int density = opts.inDensity; in decodeStream() local 525 if (density != 0 && targetDensity != 0) { in decodeStream() 526 scale = targetDensity / (float) density; in decodeStream() [all …]
|
/frameworks/base/core/tests/coretests/src/android/webkit/ |
D | ZoomManagerTest.java | 40 private void testInit(float density) { in testInit() argument 41 zoomManager.init(density); in testInit() 42 actualScaleTest(density); in testInit() 43 defaultScaleTest(density); in testInit() 46 assertEquals(density, zoomManager.getTextWrapScale()); in testInit() 56 private void testUpdateDefaultZoomDensity(float density) { in testUpdateDefaultZoomDensity() argument 57 zoomManager.updateDefaultZoomDensity(density); in testUpdateDefaultZoomDensity() 58 defaultScaleTest(density); in testUpdateDefaultZoomDensity()
|
/frameworks/base/core/java/com/android/internal/app/ |
D | PlatLogoActivity.java | 52 final int p = (int)(8 * metrics.density); in makeView() 58 final float size = 14 * metrics.density; in makeView() 63 lp.bottomMargin = (int) (-4*metrics.density); in makeView() 69 tv.setShadowLayer(4*metrics.density, 0, 2*metrics.density, 0x66000000); in makeView() 77 tv.setShadowLayer(4*metrics.density, 0, 2*metrics.density, 0x66000000); in makeView() 98 final int p = (int)(32 * metrics.density); in onCreate()
|
/frameworks/base/docs/html/guide/webapps/ |
D | targeting.jd | 20 <li><a href="#ViewportDensity">Defining the viewport target density</a></li> 59 <dt>The device's screen density</dt> 60 <dd>The screen density (the number of pixels per inch) on an Android-powered device affects 61 the resolution and size at which a web page is displayed. (There are three screen density 64 density by scaling a web page so that all devices display the web page at the same perceivable size 65 as a medium-density screen. If graphics are an important element of your web design, you 70 your web page's target screen density and providing alternative graphics for different screen 94 width of the viewport, the initial scale of the page, and the target screen density. 176 still fits the screen even if the device has a high or low-density screen, because the 178 medium-density screen, by default (as you can see in figure 2, when comparing the hdpi device to the [all …]
|
/frameworks/base/docs/html/design/style/ |
D | metrics-grids.jd | 5 <p>Devices vary not only in physical size, but also in screen density (<acronym title="Dots per 7 falling into a particular size bucket and density bucket. The size buckets are <em>handset</em> (sm… 9 screen.">dp</acronym>) and <em>tablet</em> (larger than or equal 600dp). The density buckets are <a… 10 title="Low density (120 dpi)">LDPI</acronym>, <acronym title="Medium density (160 11 dpi)">MDPI</acronym>, <acronym title="High density (240 dpi)">HDPI</acronym>, and <acronym title 12 ="Extra-high density (320 dpi)">XHDPI</acronym>. Optimize your application's UI by designing 14 for different density buckets.</p> 25 <p>Devices vary in the amount of density-independent pixels (dp) they can display.</p> 49 <li>you strike a good compromise between overall information density on the one hand, and
|
/frameworks/base/docs/html/tools/revisions/ |
D | platforms.jd | 219 QVGA (240x320, low density, small screen) 222 WQVGA400 (240x400, low density, normal screen) 225 WQVGA432 (240x432, low density, normal screen) 228 HVGA (320x480, medium density, normal screen) 231 WVGA800 (480x800, high density, normal screen) 234 WVGA854 (480x854 high density, normal screen) 237 WXGA720 (1280x720, extra-high density, normal screen) 240 WSVGA (1024x600, medium density, large screen) 243 WXGA800-7in (1280x800, high density, large screen) <span class="new">new</span> 246 WXGA800 (1280x800, medium density, xlarge screen) [all …]
|
/frameworks/support/v4/java/android/support/v4/view/ |
D | PagerTabStrip.java | 87 final float density = context.getResources().getDisplayMetrics().density; in PagerTabStrip() local 88 mIndicatorHeight = (int) (INDICATOR_HEIGHT * density + 0.5f); in PagerTabStrip() 89 mMinPaddingBottom = (int) (MIN_PADDING_BOTTOM * density + 0.5f); in PagerTabStrip() 90 mMinTextSpacing = (int) (MIN_TEXT_SPACING * density); in PagerTabStrip() 91 mTabPadding = (int) (TAB_PADDING * density + 0.5f); in PagerTabStrip() 92 mFullUnderlineHeight = (int) (FULL_UNDERLINE_HEIGHT * density + 0.5f); in PagerTabStrip() 93 mMinStripHeight = (int) (MIN_STRIP_HEIGHT * density + 0.5f); in PagerTabStrip()
|
/frameworks/base/cmds/wm/src/com/android/commands/wm/ |
D | Wm.java | 133 int density; in runDisplayDensity() local 146 density = -1; in runDisplayDensity() 149 density = Integer.parseInt(densityStr); in runDisplayDensity() 154 if (density < 72) { in runDisplayDensity() 161 if (density > 0) { in runDisplayDensity() 163 mWm.setForcedDisplayDensity(Display.DEFAULT_DISPLAY, density); in runDisplayDensity() 174 int density; in runDisplayOverscan() local
|
/frameworks/base/core/java/android/preference/ |
D | PreferenceFrameLayout.java | 53 float density = context.getResources().getDisplayMetrics().density; in PreferenceFrameLayout() local 54 int defaultBorderTop = (int) (density * DEFAULT_BORDER_TOP + 0.5f); in PreferenceFrameLayout() 55 int defaultBottomPadding = (int) (density * DEFAULT_BORDER_BOTTOM + 0.5f); in PreferenceFrameLayout() 56 int defaultLeftPadding = (int) (density * DEFAULT_BORDER_LEFT + 0.5f); in PreferenceFrameLayout() 57 int defaultRightPadding = (int) (density * DEFAULT_BORDER_RIGHT + 0.5f); in PreferenceFrameLayout()
|
/frameworks/base/docs/html/guide/practices/ |
D | screens_support.jd | 21 <li><a href="#density-independence">Density independence</a></li> 114 <dt><em>Screen density</em></dt> 116 per inch). For example, a "low" density screen has fewer pixels within a given physical area, 117 compared to a "normal" or "high" density screen.</p> 132 size and density, as specified by the generalized size and density groups.</dd> 136 or position in a density-independent way. 137 <p>The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is 138 the baseline density assumed by the system for a "medium" density screen. At runtime, the system 139 transparently handles any scaling of the dp units, as necessary, based on the actual density of the 176 baseline configuration that is a <em>normal</em> size and <em>mdpi</em> (medium) density. This [all …]
|
/frameworks/base/core/java/android/text/ |
D | TextPaint.java | 32 public float density = 1.0f; field in TextPaint 67 density = tp.density; in set()
|
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ |
D | RenderAction.java | 109 metrics.density = metrics.noncompatDensity = in init() 112 metrics.scaledDensity = metrics.noncompatScaledDensity = metrics.density; in init() 332 Density density = hardwareConfig.getDensity(); in getConfiguration() local 333 if (density == null) { in getConfiguration() 334 density = Density.MEDIUM; in getConfiguration() 337 config.screenWidthDp = hardwareConfig.getScreenWidth() / density.getDpiValue(); in getConfiguration() 338 config.screenHeightDp = hardwareConfig.getScreenHeight() / density.getDpiValue(); in getConfiguration() 344 config.densityDpi = density.getDpiValue(); in getConfiguration()
|
/frameworks/base/policy/src/com/android/internal/policy/impl/keyguard/ |
D | KeyguardWidgetFrame.java | 108 float density = res.getDisplayMetrics().density; in KeyguardWidgetFrame() local 109 int padding = (int) (res.getDisplayMetrics().density * 8); in KeyguardWidgetFrame() 112 mFrameStrokeAdjustment = 2 + (int) (2 * density); in KeyguardWidgetFrame() 486 float density = getResources().getDisplayMetrics().density; in performAppWidgetSizeCallbacksIfNecessary() local 488 int width = (int) (content.getMeasuredWidth() / density); in performAppWidgetSizeCallbacksIfNecessary() 489 int height = (int) (content.getMeasuredHeight() / density); in performAppWidgetSizeCallbacksIfNecessary()
|
/frameworks/base/media/java/android/media/audiofx/ |
D | EnvironmentalReverb.java | 417 public void setDensity(short density) in setDensity() argument 419 byte[] param = shortToByteArray(density); in setDensity() 519 public short density; field in EnvironmentalReverb.Settings 591 density = Short.parseShort(st.nextToken()); in Settings() 610 ";density="+Short.toString(density) in toString() 641 settings.density = byteArrayToShort(param, 24); in getProperties() 665 shortToByteArray(settings.density)); in setProperties()
|
/frameworks/wilhelm/src/itf/ |
D | IEnvironmentalReverb.c | 580 SLpermille density) in IEnvironmentalReverb_SetDensity() argument 584 if (!(0 <= density && density <= 1000)) { in IEnvironmentalReverb_SetDensity() 589 thiz->mProperties.density = density; in IEnvironmentalReverb_SetDensity() 597 REVERB_PARAM_DENSITY, &density); in IEnvironmentalReverb_SetDensity() 625 REVERB_PARAM_DENSITY, &thiz->mProperties.density); in IEnvironmentalReverb_GetDensity() 629 *pDensity = thiz->mProperties.density; in IEnvironmentalReverb_GetDensity() 669 if (!(0 <= properties.density && properties.density <= 1000)) in IEnvironmentalReverb_SetEnvironmentalReverbProperties()
|