/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/ |
D | IconLoader.java | 34 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()
|
D | NavigationBar.java | 63 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()
|
D | StatusBar.java | 64 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/ |
D | update_nav_icons.sh | 38 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/ |
D | LauncherActivityInfo.java | 108 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/ |
D | DisplayMetrics.java | 168 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/ |
D | targeting.jd | 12 <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/ |
D | Wm.java | 174 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/ |
D | CircleImageView.java | 53 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/ |
D | ResourceFilter_test.cpp | 35 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/ |
D | ViewConfiguration.java | 287 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/ |
D | screens_support.jd | 24 <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/ |
D | BitmapFactory.java | 432 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/ |
D | AppWidgetProviderInfo.java | 273 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/ |
D | PagerTabStrip.java | 90 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/ |
D | PreferenceFrameLayout.java | 57 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/ |
D | Bitmap_Delegate.java | 102 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 …]
|
D | BitmapFactory_Delegate.java | 55 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/ |
D | platforms.jd | 559 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/ |
D | TextPaint.java | 35 public float density = 1.0f; field in TextPaint 71 density = tp.density; in set()
|
/frameworks/base/libs/hwui/ |
D | FrameInfoVisualizer.cpp | 59 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/ |
D | AssistVisualizer.java | 77 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/ |
D | ResourcesCompat.java | 82 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/ |
D | RenderAction.java | 112 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/ |
D | ConfigDescription.cpp | 244 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 …]
|