/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 | 44 public NavigationBar(BridgeContext context, Density density, int orientation, boolean isRtl, in NavigationBar() argument 46 this(context, density, orientation, isRtl, rtlEnabled, simulatedPlatformVersion, in NavigationBar() 50 protected NavigationBar(BridgeContext context, Density density, int orientation, boolean isRtl, in NavigationBar() argument 70 loadIcon(back, "ic_sysbar_back.png", density, isRtl); in NavigationBar() 72 loadIcon(3, "ic_sysbar_home.png", density, isRtl); in NavigationBar() 74 loadIcon(recent, "ic_sysbar_recent.png", density, isRtl); in NavigationBar() 96 size *= context.getMetrics().density; in setSize() 130 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/util/ |
D | DisplayMetrics.java | 181 public float density; field in DisplayMetrics 251 density = o.density; in setTo() 268 density = DENSITY_DEVICE / (float) DENSITY_DEFAULT; in setToDefaults() 270 scaledDensity = density; in setToDefaults() 275 noncompatDensity = density; in setToDefaults() 312 && density == other.density in equalsPhysical() 331 return "DisplayMetrics{density=" + density + ", width=" + widthPixels + in toString()
|
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/ |
D | BitmapFactory_Delegate.java | 55 Density density = Density.MEDIUM; in nativeDecodeStream() local 58 density = Density.getEnum(opts.inDensity); in nativeDecodeStream() 76 density); in nativeDecodeStream() 92 bm = Bitmap_Delegate.createBitmap(is, bitmapCreateFlags, density); in nativeDecodeStream() 135 final int density = opts.inDensity; in setDensityFromOptions() local 136 if (density != 0) { in setDensityFromOptions() 137 outputBitmap.setDensity(density); in setDensityFromOptions() 139 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in setDensityFromOptions()
|
D | Bitmap_Delegate.java | 109 public static Bitmap createBitmap(File input, boolean isMutable, Density density) in createBitmap() argument 111 return createBitmap(input, getPremultipliedBitmapCreateFlags(isMutable), density); in createBitmap() 125 Density density) throws IOException { in createBitmap() argument 144 return createBitmap(delegate, createFlags, density.getDpiValue()); in createBitmap() 157 public static Bitmap createBitmap(InputStream input, boolean isMutable, Density density) in createBitmap() argument 159 return createBitmap(input, getPremultipliedBitmapCreateFlags(isMutable), density); in createBitmap() 173 Density density) throws IOException { in createBitmap() argument 177 return createBitmap(delegate, createFlags, density.getDpiValue()); in createBitmap() 190 public static Bitmap createBitmap(BufferedImage image, boolean isMutable, Density density) { in createBitmap() argument 191 return createBitmap(image, getPremultipliedBitmapCreateFlags(isMutable), density); in createBitmap() [all …]
|
/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/packages/SettingsLib/src/com/android/settingslib/display/ |
D | DisplayDensityUtils.java | 120 final int density = ((int) (defaultDensity * (1 - (i + 1) * interval))) & ~1; in DisplayDensityUtils() local 121 if (currentDensity == density) { in DisplayDensityUtils() 125 values[curIndex] = density; in DisplayDensityUtils() 141 final int density = ((int) (defaultDensity * (1 + (i + 1) * interval))) & ~1; in DisplayDensityUtils() local 142 if (currentDensity == density) { in DisplayDensityUtils() 145 values[curIndex] = density; in DisplayDensityUtils() 230 public static void setForcedDisplayDensity(final int displayId, final int density) { in setForcedDisplayDensity() argument 236 wm.setForcedDisplayDensity(displayId, density); in setForcedDisplayDensity()
|
/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/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/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/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/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/graphics/java/android/graphics/ |
D | BitmapFactory.java | 443 final int density = value.density; in decodeResourceStream() local 444 if (density == TypedValue.DENSITY_DEFAULT) { in decodeResourceStream() 446 } else if (density != TypedValue.DENSITY_NONE) { in decodeResourceStream() 447 opts.inDensity = density; in decodeResourceStream() 565 final int density = opts.inDensity; in setDensityFromOptions() local 566 if (density != 0) { in setDensityFromOptions() 567 outputBitmap.setDensity(density); in setDensityFromOptions() 569 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/content/pm/ |
D | LauncherActivityInfo.java | 103 public Drawable getIcon(int density) { in getIcon() argument 107 if (density != 0 && iconRes != 0) { in getIcon() 111 icon = resources.getDrawableForDensity(iconRes, density); in getIcon() 170 public Drawable getBadgedIcon(int density) { in getBadgedIcon() argument 171 Drawable originalIcon = getIcon(density); in getBadgedIcon()
|
/frameworks/support/v4/tests/java/android/support/v4/widget/ |
D | SwipeRefreshLayoutTest.java | 83 float density = mSwipeRefresh.getResources().getDisplayMetrics().density; in testSetSize() local 84 assertEquals((int) (SwipeRefreshLayout.CIRCLE_DIAMETER * density), in testSetSize() 87 assertEquals((int) (SwipeRefreshLayout.CIRCLE_DIAMETER_LARGE * density), in testSetSize() 90 assertEquals((int) (SwipeRefreshLayout.CIRCLE_DIAMETER * density), in testSetSize()
|
/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/aapt2/split/ |
D | TableSplitter.cpp | 34 withoutDensity.density = 0; in copyWithoutDensity() 45 if (config.density == 0) { in SplitValueSelector() 48 mDensityDependentConfigToDensityMap[copyWithoutDensity(config)] = config.density; in SplitValueSelector() 61 if (configValue->config.density == 0 && !entry.second) { in selectValues() 84 targetDensity.density = densityValueIter->second; in selectValues() 121 targetDensity.density = preferredDensity; in markNonPreferredDensitiesAsClaimed() 195 if (configValue->config.density != 0) { in splitTable()
|
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ |
D | RenderAction.java | 111 metrics.density = metrics.noncompatDensity = in init() 114 metrics.scaledDensity = metrics.noncompatScaledDensity = metrics.density; in init() 346 Density density = hardwareConfig.getDensity(); in getConfiguration() local 347 if (density == null) { in getConfiguration() 348 density = Density.MEDIUM; in getConfiguration() 351 config.screenWidthDp = hardwareConfig.getScreenWidth() / density.getDpiValue(); in getConfiguration() 352 config.screenHeightDp = hardwareConfig.getScreenHeight() / density.getDpiValue(); in getConfiguration() 359 config.densityDpi = density.getDpiValue(); in getConfiguration()
|
/frameworks/base/tests/VoiceInteraction/src/com/android/test/voiceinteraction/ |
D | AssistVisualizer.java | 81 float density = getResources().getDisplayMetrics().density; in AssistVisualizer() local 82 mFramePaint.setShadowLayer(density, density, density, 0xff000000); in AssistVisualizer() 86 mFrameNoTransformPaint.setShadowLayer(density, density, density, 0xff000000); in AssistVisualizer()
|
/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 | 64 static int dpToPx(int dp, float density) { in dpToPx() argument 65 return (int) (dp * density + 0.5f); in dpToPx() 77 void FrameInfoVisualizer::setDensity(float density) { in setDensity() argument 78 if (CC_UNLIKELY(mDensity != density)) { in setDensity() 79 mDensity = density; in setDensity() 80 mVerticalUnit = dpToPx(PROFILE_DRAW_DP_PER_MS, density); in setDensity() 81 mThresholdStroke = dpToPx(PROFILE_DRAW_THRESHOLD_STROKE_WIDTH, density); in setDensity()
|