Home
last modified time | relevance | path

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

1234567891011

/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/
DIconLoader.java34 IconLoader(String iconName, Density density, int platformVersion, LayoutDirection direction) { in IconLoader() argument
36 mDesiredDensity = density; in IconLoader()
83 for (Density density : Density.values()) { in getIcon()
84 if (density == mDesiredDensity) { in getIcon()
88 stream = getIcon(resourceDir, density); in getIcon()
90 mCurrentDensity = density; in getIcon()
101 private InputStream getIcon(String resourceDir, Density density) { in getIcon() argument
110 .append(density.getResourceValue()) in getIcon()
120 .append(density.getResourceValue()) in getIcon()
DNavigationBar.java63 public NavigationBar(BridgeContext context, Density density, int orientation, boolean isRtl, in NavigationBar() argument
84 loadIcon(back, "ic_sysbar_back.png", density, isRtl); in NavigationBar()
86 loadIcon(3, "ic_sysbar_home.png", density, isRtl); in NavigationBar()
88 loadIcon(recent, "ic_sysbar_recent.png", density, isRtl); in NavigationBar()
110 size *= context.getMetrics().density; in setSize()
144 sw /= metrics.density; in getShortestWidth()
DStatusBar.java64 public StatusBar(BridgeContext context, Density density, boolean isRtl, boolean rtlEnabled, in StatusBar() argument
82 + Config.getWifiIconType(simulatedPlatformVersion), density); in StatusBar()
83 loadIcon(2, "stat_sys_battery_100.png", density); in StatusBar()
89 protected void loadIcon(int index, String iconName, Density density) { in loadIcon() argument
91 super.loadIcon(index, iconName, density); in loadIcon()
/frameworks/base/tools/layoutlib/bridge/
Dupdate_nav_icons.sh38 for density in $DENSITIES
40 destination="$BARS/v$CURRENT_API/$density/"
42 cp -v "$FB/packages/SystemUI/res/drawable-$density/$icon" "$destination"
45 for density in $DENSITIES
47 destination="$BARS/v$CURRENT_API/ldrtl-$density/"
49 cp -v "$FB/packages/SystemUI/res/drawable-ldrtl-$density/$icon" "$destination"
/frameworks/base/core/java/android/content/pm/
DLauncherActivityInfo.java108 public Drawable getIcon(int density) { in getIcon() argument
110 Drawable icon = getDrawableForDensity(iconRes, density); in getIcon()
127 private Drawable getOriginalIcon(int density) { in getOriginalIcon() argument
129 Drawable icon = getDrawableForDensity(iconRes, density); in getOriginalIcon()
145 private Drawable getDrawableForDensity(int iconRes, int density) { in getDrawableForDensity() argument
147 if (density != 0 && iconRes != 0) { in getDrawableForDensity()
151 return resources.getDrawableForDensity(iconRes, density); in getDrawableForDensity()
200 public Drawable getBadgedIcon(int density) { in getBadgedIcon() argument
201 Drawable originalIcon = getOriginalIcon(density); in getBadgedIcon()
/frameworks/base/core/java/android/util/
DDisplayMetrics.java168 public float density; field in DisplayMetrics
238 density = o.density; in setTo()
255 density = DENSITY_DEVICE / (float) DENSITY_DEFAULT; in setToDefaults()
257 scaledDensity = density; in setToDefaults()
262 noncompatDensity = density; in setToDefaults()
299 && density == other.density in equalsPhysical()
318 return "DisplayMetrics{density=" + density + ", width=" + widthPixels + in toString()
/frameworks/base/docs/html/guide/webapps/
Dtargeting.jd12 <li><a href="#ViewportDensity">Defining the viewport target density</a></li>
49 <dt><a href="#DensityCSS">The screen density</a></dt>
51 pixel values to density-independent pixel values, so your web page appears at the same perceivable
52 size as a medium-density screen (about 160dpi). However, if graphics are an important element of
128 "0.75", "1", or "1.5", to indicate that the styles are for devices with low density, medium density,
129 or high density screens, respectively.</p>
131 <p>For example, you can create separate stylesheets for each density:</p>
143 background:url(medium-density-image.png);
147 /* CSS for high-density screens */
149 background:url(high-density-image.png);
[all …]
/frameworks/base/cmds/wm/src/com/android/commands/wm/
DWm.java174 int density; in runDisplayDensity() local
187 density = -1; in runDisplayDensity()
190 density = Integer.parseInt(densityStr); in runDisplayDensity()
195 if (density < 72) { in runDisplayDensity()
202 if (density > 0) { in runDisplayDensity()
204 mWm.setForcedDisplayDensity(Display.DEFAULT_DISPLAY, density); in runDisplayDensity()
257 int density; in parseDimension() local
259 density = mWm.getBaseDisplayDensity(Display.DEFAULT_DISPLAY); in parseDimension()
261 density = DisplayMetrics.DENSITY_DEFAULT; in parseDimension()
263 return Integer.parseInt(s.substring(0, s.length() - 2)) * density / in parseDimension()
/frameworks/support/v4/java/android/support/v4/widget/
DCircleImageView.java53 final float density = getContext().getResources().getDisplayMetrics().density; in CircleImageView() local
54 final int diameter = (int) (radius * density * 2); in CircleImageView()
55 final int shadowYOffset = (int) (density * Y_OFFSET); in CircleImageView()
56 final int shadowXOffset = (int) (density * X_OFFSET); in CircleImageView()
58 mShadowRadius = (int) (density * SHADOW_RADIUS); in CircleImageView()
63 ViewCompat.setElevation(this, SHADOW_ELEVATION * density); in CircleImageView()
/frameworks/base/tools/aapt/tests/
DResourceFilter_test.cpp35 config.density = 320; in TEST()
50 config.density = 320; in TEST()
73 config.density = 320; in TEST()
168 config.density = 160; in TEST()
176 expectedConfig.density = 160; in TEST()
184 config.density = 160; in TEST()
189 config.density = 480; in TEST()
197 expectedConfig.density = 160; in TEST()
/frameworks/base/core/java/android/view/
DViewConfiguration.java287 final float density = metrics.density; in ViewConfiguration() local
290 sizeAndDensity = density * 1.5f; in ViewConfiguration()
292 sizeAndDensity = density; in ViewConfiguration()
297 mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); in ViewConfiguration()
365 final int density = (int) (100.0f * metrics.density); in get() local
367 ViewConfiguration configuration = sConfigurations.get(density); in get()
370 sConfigurations.put(density, configuration); in get()
/frameworks/base/docs/html/guide/practices/
Dscreens_support.jd24 <li><a href="#density-independence">Density independence</a></li>
116 <dt><em>Screen density</em></dt>
118 per inch). For example, a "low" density screen has fewer pixels within a given physical area,
119 compared to a "normal" or "high" density screen.</p>
134 size and density, as specified by the generalized size and density groups.</dd>
138 or position in a density-independent way.
139 <p>The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is
140 the baseline density assumed by the system for a "medium" density screen. At runtime, the system
141 transparently handles any scaling of the dp units, as necessary, based on the actual density of the
184 baseline configuration that is a <em>normal</em> size and <em>mdpi</em> (medium) density. This
[all …]
/frameworks/base/graphics/java/android/graphics/
DBitmapFactory.java432 final int density = value.density; in decodeResourceStream() local
433 if (density == TypedValue.DENSITY_DEFAULT) { in decodeResourceStream()
435 } else if (density != TypedValue.DENSITY_NONE) { in decodeResourceStream()
436 opts.inDensity = density; in decodeResourceStream()
554 final int density = opts.inDensity; in setDensityFromOptions() local
555 if (density != 0) { in setDensityFromOptions()
556 outputBitmap.setDensity(density); in setDensityFromOptions()
558 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in setDensityFromOptions()
/frameworks/base/core/java/android/appwidget/
DAppWidgetProviderInfo.java273 public final Drawable loadIcon(@NonNull Context context, int density) { in loadIcon() argument
274 return loadDrawable(context, density, providerInfo.getIconResource(), true); in loadIcon()
293 public final Drawable loadPreviewImage(@NonNull Context context, int density) { in loadPreviewImage() argument
294 return loadDrawable(context, density, previewImage, false); in loadPreviewImage()
364 private Drawable loadDrawable(Context context, int density, int resourceId, in loadDrawable() argument
370 if (density <= 0) { in loadDrawable()
371 density = context.getResources().getDisplayMetrics().densityDpi; in loadDrawable()
373 return resources.getDrawableForDensity(resourceId, density); in loadDrawable()
/frameworks/support/v4/java/android/support/v4/view/
DPagerTabStrip.java90 final float density = context.getResources().getDisplayMetrics().density; in PagerTabStrip() local
91 mIndicatorHeight = (int) (INDICATOR_HEIGHT * density + 0.5f); in PagerTabStrip()
92 mMinPaddingBottom = (int) (MIN_PADDING_BOTTOM * density + 0.5f); in PagerTabStrip()
93 mMinTextSpacing = (int) (MIN_TEXT_SPACING * density); in PagerTabStrip()
94 mTabPadding = (int) (TAB_PADDING * density + 0.5f); in PagerTabStrip()
95 mFullUnderlineHeight = (int) (FULL_UNDERLINE_HEIGHT * density + 0.5f); in PagerTabStrip()
96 mMinStripHeight = (int) (MIN_STRIP_HEIGHT * density + 0.5f); in PagerTabStrip()
/frameworks/base/core/java/android/preference/
DPreferenceFrameLayout.java57 float density = context.getResources().getDisplayMetrics().density; in PreferenceFrameLayout() local
58 int defaultBorderTop = (int) (density * DEFAULT_BORDER_TOP + 0.5f); in PreferenceFrameLayout()
59 int defaultBottomPadding = (int) (density * DEFAULT_BORDER_BOTTOM + 0.5f); in PreferenceFrameLayout()
60 int defaultLeftPadding = (int) (density * DEFAULT_BORDER_LEFT + 0.5f); in PreferenceFrameLayout()
61 int defaultRightPadding = (int) (density * DEFAULT_BORDER_RIGHT + 0.5f); in PreferenceFrameLayout()
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DBitmap_Delegate.java102 public static Bitmap createBitmap(File input, boolean isMutable, Density density) in createBitmap() argument
104 return createBitmap(input, getPremultipliedBitmapCreateFlags(isMutable), density); in createBitmap()
118 Density density) throws IOException { in createBitmap() argument
122 return createBitmap(delegate, createFlags, density.getDpiValue()); in createBitmap()
135 public static Bitmap createBitmap(InputStream input, boolean isMutable, Density density) in createBitmap() argument
137 return createBitmap(input, getPremultipliedBitmapCreateFlags(isMutable), density); in createBitmap()
151 Density density) throws IOException { in createBitmap() argument
155 return createBitmap(delegate, createFlags, density.getDpiValue()); in createBitmap()
168 public static Bitmap createBitmap(BufferedImage image, boolean isMutable, Density density) { in createBitmap() argument
169 return createBitmap(image, getPremultipliedBitmapCreateFlags(isMutable), density); in createBitmap()
[all …]
DBitmapFactory_Delegate.java55 Density density = Density.MEDIUM; in nativeDecodeStream() local
58 density = Density.getEnum(opts.inDensity); in nativeDecodeStream()
75 density); in nativeDecodeStream()
91 bm = Bitmap_Delegate.createBitmap(is, bitmapCreateFlags, density); in nativeDecodeStream()
/frameworks/base/docs/html/tools/revisions/
Dplatforms.jd559 QVGA (240x320, low density, small screen)
562 WQVGA400 (240x400, low density, normal screen)
565 WQVGA432 (240x432, low density, normal screen)
568 HVGA (320x480, medium density, normal screen)
571 WVGA800 (480x800, high density, normal screen)
574 WVGA854 (480x854 high density, normal screen)
577 WXGA720 (1280x720, extra-high density, normal screen)
580 WSVGA (1024x600, medium density, large screen)
583 WXGA800-7in (1280x800, high density, large screen) <span class="new">new</span>
586 WXGA800 (1280x800, medium density, xlarge screen)
[all …]
/frameworks/base/core/java/android/text/
DTextPaint.java35 public float density = 1.0f; field in TextPaint
71 density = tp.density; in set()
/frameworks/base/libs/hwui/
DFrameInfoVisualizer.cpp59 static int dpToPx(int dp, float density) { in dpToPx() argument
60 return (int) (dp * density + 0.5f); in dpToPx()
72 void FrameInfoVisualizer::setDensity(float density) { in setDensity() argument
73 if (CC_UNLIKELY(mDensity != density)) { in setDensity()
74 mDensity = density; in setDensity()
75 mVerticalUnit = dpToPx(PROFILE_DRAW_DP_PER_MS, density); in setDensity()
76 mThresholdStroke = dpToPx(PROFILE_DRAW_THRESHOLD_STROKE_WIDTH, density); in setDensity()
/frameworks/base/tests/VoiceInteraction/src/com/android/test/voiceinteraction/
DAssistVisualizer.java77 float density = getResources().getDisplayMetrics().density; in AssistVisualizer() local
78 mFramePaint.setShadowLayer(density, density, density, 0xff000000); in AssistVisualizer()
82 mFrameNoTransformPaint.setShadowLayer(density, density, density, 0xff000000); in AssistVisualizer()
/frameworks/support/v4/java/android/support/v4/content/res/
DResourcesCompat.java82 public static Drawable getDrawableForDensity(Resources res, int id, int density, Theme theme) in getDrawableForDensity() argument
86 return ResourcesCompatApi21.getDrawableForDensity(res, id, density, theme); in getDrawableForDensity()
88 return ResourcesCompatIcsMr1.getDrawableForDensity(res, id, density); in getDrawableForDensity()
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DRenderAction.java112 metrics.density = metrics.noncompatDensity = in init()
115 metrics.scaledDensity = metrics.noncompatScaledDensity = metrics.density; in init()
348 Density density = hardwareConfig.getDensity(); in getConfiguration() local
349 if (density == null) { in getConfiguration()
350 density = Density.MEDIUM; in getConfiguration()
353 config.screenWidthDp = hardwareConfig.getScreenWidth() / density.getDpiValue(); in getConfiguration()
354 config.screenHeightDp = hardwareConfig.getScreenHeight() / density.getDpiValue(); in getConfiguration()
361 config.densityDpi = density.getDpiValue(); in getConfiguration()
/frameworks/base/tools/aapt2/
DConfigDescription.cpp244 if (out) out->density = ResTable_config::DENSITY_DEFAULT; in parseDensity()
249 if (out) out->density = ResTable_config::DENSITY_ANY; in parseDensity()
254 if (out) out->density = ResTable_config::DENSITY_NONE; in parseDensity()
259 if (out) out->density = ResTable_config::DENSITY_LOW; in parseDensity()
264 if (out) out->density = ResTable_config::DENSITY_MEDIUM; in parseDensity()
269 if (out) out->density = ResTable_config::DENSITY_TV; in parseDensity()
274 if (out) out->density = ResTable_config::DENSITY_HIGH; in parseDensity()
279 if (out) out->density = ResTable_config::DENSITY_XHIGH; in parseDensity()
284 if (out) out->density = ResTable_config::DENSITY_XXHIGH; in parseDensity()
289 if (out) out->density = ResTable_config::DENSITY_XXXHIGH; in parseDensity()
[all …]

1234567891011