Home
last modified time | relevance | path

Searched refs:density (Results 1 – 25 of 193) sorted by relevance

12345678

/frameworks/base/core/java/android/util/
DDisplayMetrics.java122 public float density; field in DisplayMetrics
192 density = o.density; in setTo()
209 density = DENSITY_DEVICE / (float) DENSITY_DEFAULT; in setToDefaults()
211 scaledDensity = density; in setToDefaults()
216 noncompatDensity = density; in setToDefaults()
253 && density == other.density in equalsPhysical()
272 return "DisplayMetrics{density=" + density + ", width=" + widthPixels + in toString()
/frameworks/base/core/java/android/view/
DViewConfiguration.java265 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/graphics/java/android/graphics/
DBitmapFactory.java343 final int density = value.density; in decodeResourceStream() local
344 if (density == TypedValue.DENSITY_DEFAULT) { in decodeResourceStream()
346 } else if (density != TypedValue.DENSITY_NONE) { in decodeResourceStream()
347 opts.inDensity = density; in decodeResourceStream()
495 final int density = opts.inDensity; in decodeStream() local
497 if (density != 0 && targetDensity != 0) { in decodeStream()
498 scale = targetDensity / (float) density; in decodeStream()
522 final int density = opts.inDensity; in decodeStream() local
524 if (density != 0 && targetDensity != 0) { in decodeStream()
525 scale = targetDensity / (float) density; in decodeStream()
[all …]
DBitmap.java77 public static void setDefaultDensity(int density) { in setDefaultDensity() argument
78 sDefaultDensity = density; in setDefaultDensity()
98 int density) { in Bitmap() argument
99 this(nativeBitmap, buffer, isMutable, ninePatchChunk, null, density); in Bitmap()
111 int[] layoutBounds, int density) { in Bitmap() argument
124 if (density >= 0) { in Bitmap()
125 mDensity = density; in Bitmap()
166 public void setDensity(int density) { in setDensity() argument
167 mDensity = density; in setDensity()
1429 int density, in nativeWriteToParcel() argument
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DBitmapFactory_Delegate.java52 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()
DBitmap_Delegate.java93 public static Bitmap createBitmap(File input, boolean isMutable, Density density) in createBitmap() argument
98 return createBitmap(delegate, isMutable, density.getDpiValue()); in createBitmap()
111 public static Bitmap createBitmap(InputStream input, boolean isMutable, Density density) in createBitmap() argument
116 return createBitmap(delegate, isMutable, density.getDpiValue()); in createBitmap()
130 Density density) throws IOException { in createBitmap() argument
134 return createBitmap(delegate, isMutable, density.getDpiValue()); in createBitmap()
418 int density, Parcel p) { in nativeWriteToParcel() argument
522 private static Bitmap createBitmap(Bitmap_Delegate delegate, boolean isMutable, int density) { in createBitmap() argument
528 density); in createBitmap()
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/
DNavigationBar.java29 …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()
DStatusBar.java33 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()
DCustomBar.java63 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()
DTitleBar.java31 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()
DFakeActionBar.java31 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/core/tests/coretests/src/android/webkit/
DZoomManagerTest.java40 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/docs/html/guide/webapps/
Dtargeting.jd20 <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/
Dmetrics-grids.jd4 <p>Devices vary not only in physical size, but also in screen density (<acronym title="Dots per
6 falling into a particular size bucket and density bucket. The size buckets are <em>handset</em> (sm…
8 screen.">dp</acronym>) and <em>tablet</em> (larger than or equal 600dp). The density buckets are <a…
9 title="Low density (120 dpi)">LDPI</acronym>, <acronym title="Medium density (160
10 dpi)">MDPI</acronym>, <acronym title="High density (240 dpi)">HDPI</acronym>, and <acronym title
11 ="Extra-high density (320 dpi)">XHDPI</acronym>. Optimize your application's UI by designing
13 for different density buckets.</p>
24 <p>Devices vary in the amount of density-independent pixels (dp) they can display.</p>
48 <li>you strike a good compromise between overall information density on the one hand, and
/frameworks/base/core/java/com/android/internal/app/
DPlatLogoActivity.java52 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/tools/revisions/
Dplatforms.jd202 QVGA (240x320, low density, small screen)
205 WQVGA400 (240x400, low density, normal screen)
208 WQVGA432 (240x432, low density, normal screen)
211 HVGA (320x480, medium density, normal screen)
214 WVGA800 (480x800, high density, normal screen)
217 WVGA854 (480x854 high density, normal screen)
220 WXGA720 (1280x720, extra-high density, normal screen)
223 WSVGA (1024x600, medium density, large screen)
226 WXGA800-7in (1280x800, high density, large screen) <span class="new">new</span>
229 WXGA800 (1280x800, medium density, xlarge screen)
[all …]
/frameworks/base/docs/html/guide/practices/
Dscreens_support.jd21 <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/support/v4/java/android/support/v4/view/
DPagerTabStrip.java87 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/core/java/android/preference/
DPreferenceFrameLayout.java53 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/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DRenderAction.java109 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/core/java/android/text/
DTextPaint.java32 public float density = 1.0f; field in TextPaint
67 density = tp.density; in set()
/frameworks/base/policy/src/com/android/internal/policy/impl/keyguard/
DKeyguardWidgetFrame.java108 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/
DEnvironmentalReverb.java417 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/
DIEnvironmentalReverb.c580 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()
/frameworks/base/docs/html/about/versions/
Dandroid-1.6.jd160 <li>Fixes bug so that Bitmap's density is now propagated through Parcelable.</li>
162 <li>Fixes TextView to properly compute styled font metrics based on the screen density.</li>
173 <li>Fixes density rendering in the layout editor in ADT.</li>
236 nine-patches based on the density the resource was found under and the
237 density of the screen, etc.
291 determining the density of the current device screen.</li>
300 of resolution and density. If your application is run on a device whose screen
303 of the application UI to match the resolution and density of the screen.
311 Examples: QVGA low density; VGA high density.
315 Examples: WQVGA low density; HVGA medium density; WVGA high density.
[all …]

12345678