/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
H A D | ListActivity.java | 116 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f));
|
H A D | TransparentListActivity.java | 114 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f));
|
H A D | ViewLayersActivity2.java | 61 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f));
|
H A D | ViewLayersActivity4.java | 65 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f));
|
H A D | DisplayListLayersActivity.java | 79 return (int) (getResources().getDisplayMetrics().density * size + 0.5f);
|
/frameworks/base/tests/UiBench/src/com/android/test/uibench/ |
H A D | GlTextureViewActivity.java | 55 mTextureView.setCameraDistance(distance * metrics.density);
|
/frameworks/base/tools/aapt2/filter/ |
H A D | ConfigFilter.cpp | 31 // Ignore any densities. Those are best handled in --preferred-density 33 config.density = 0;
|
/frameworks/base/core/java/com/android/internal/view/menu/ |
H A D | ActionMenuItemView.java | 78 final float density = res.getDisplayMetrics().density; 79 mMaxIconSize = (int) (MAX_ICON_SIZE * density + 0.5f);
|
H A D | MenuPopupHelper.java | 269 final float density = mContext.getResources().getDisplayMetrics().density; 270 final int halfSize = (int) (TOUCH_EPICENTER_SIZE_DP * density / 2);
|
/frameworks/base/services/core/java/com/android/server/policy/ |
H A D | IconUtilities.java | 63 final float density = metrics.density; 64 final float blurPx = 5 * density; 114 // Ensure the bitmap has a density.
|
/frameworks/support/compat/java/android/support/v4/content/res/ |
H A D | ResourcesCompat.java | 87 * the given screen density in DPI and styled for the specified theme. 89 * Prior to API level 15, the theme and density will not be applied and 98 * @param density The desired screen density indicated by the resource as 109 int density, @Nullable Theme theme) throws NotFoundException { 111 return res.getDrawableForDensity(id, density, theme); 113 return res.getDrawableForDensity(id, density); 108 getDrawableForDensity(@onNull Resources res, @DrawableRes int id, int density, @Nullable Theme theme) argument
|
/frameworks/support/v7/appcompat/src/android/support/v7/view/menu/ |
H A D | ActionMenuItemView.java | 80 final float density = res.getDisplayMetrics().density; 81 mMaxIconSize = (int) (MAX_ICON_SIZE * density + 0.5f);
|
H A D | MenuPopupHelper.java | 281 final float density = mContext.getResources().getDisplayMetrics().density; 282 final int halfSize = (int) (TOUCH_EPICENTER_SIZE_DP * density / 2);
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
H A D | BitmapDrawable.java | 97 // These are scaled to match the target density. 108 * Create an empty drawable, not dealing with density. 110 * instead to specify a bitmap to draw with and ensure the correct density is set. 118 * Create an empty drawable, setting initial target density based on 132 * Create drawable from a bitmap, not dealing with density. 134 * that the drawable has correctly set its target density. 142 * Create drawable from a bitmap, setting initial target density based on 153 * that the drawable has correctly set its target density. 178 * that the drawable has correctly set its target density. 234 * Set the density scal 267 setTargetDensity(int density) argument [all...] |
H A D | Drawable.java | 192 * The source density to use when looking up resources using 194 * override and the system density will be used. 197 * account for source density overrides. Custom drawables implemented by developers do not need 198 * to be aware of the source density override, as it is only used by Launcher to load higher 1156 * value to determine density information. 1170 * value to determine density information. 1186 // Special stuff for compatibility mode: if the target density is not 1187 // the same as the display density, but the resource -is- the same as 1188 // the display density, then don't scale it down to the target density 1238 createFromXmlForDensity(@onNull Resources r, @NonNull XmlPullParser parser, int density, @Nullable Theme theme) argument 1292 createFromXmlInnerForDensity(@onNull Resources r, @NonNull XmlPullParser parser, @NonNull AttributeSet attrs, int density, @Nullable Theme theme) argument 1369 setSrcDensityOverride(int density) argument [all...] |
H A D | NinePatchDrawable.java | 70 /** Temporary rect used for density scaling. */ 84 // These are scaled to match the target density. 93 * Create drawable from raw nine-patch data, not dealing with density. 96 * to ensure that the drawable has correctly set its target density. 104 * Create drawable from raw nine-patch data, setting initial target density 113 * Create drawable from raw nine-patch data, setting initial target density 125 * Create drawable from existing nine-patch, not dealing with density. 129 * density. 137 * Create drawable from existing nine-patch, setting initial target density 145 * Set the density scal 178 setTargetDensity(int density) argument [all...] |
/frameworks/base/core/java/android/view/ |
H A D | SurfaceControl.java | 606 public float density; field in class:SurfaceControl.PhysicalDisplayInfo 630 && density == other.density 647 density = other.density; 659 + "density " + density + ", " + xDpi + " x " + yDpi + " dpi, secure " + secure
|
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ |
H A D | ResourceHelper.java | 289 Density density = Density.MEDIUM; 291 density = ((DensityBasedResourceValue) value).getResourceDensity(); 298 return getNinePatchDrawable(new FileInputStream(file), density, 343 Bitmap_Delegate.createBitmap(bmpFile, false /*isMutable*/, density); 454 private static Drawable getNinePatchDrawable(InputStream inputStream, Density density, argument 478 density);
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
H A D | LockIcon.java | 109 final int density = newConfig.densityDpi; 110 if (density != mDensity) { 111 mDensity = density;
|
/frameworks/base/packages/EasterEgg/src/com/android/egg/neko/ |
H A D | NekoDialog.java | 43 final float dp = context.getResources().getDisplayMetrics().density;
|
/frameworks/base/core/java/android/content/res/ |
H A D | Resources.java | 768 * would not correctly retrieve the final configuration density when 770 * This means that if the density configuration of the alias resource 771 * is different than the actual resource, the density of the returned 823 * given screen density in DPI. This will set the drawable's density to be 824 * the device's density multiplied by the ratio of actual drawable density 825 * to requested density. This allows the drawable to be scaled up to the 839 * @param density the desired screen density indicate 850 getDrawableForDensity(@rawableRes int id, int density) argument 871 getDrawableForDensity(@rawableRes int id, int density, @Nullable Theme theme) argument 883 loadDrawable(@onNull TypedValue value, int id, int density, @Nullable Theme theme) argument 1331 getValueForDensity(@nyRes int id, int density, TypedValue outValue, boolean resolveRefs) argument [all...] |
/frameworks/base/graphics/java/android/graphics/ |
H A D | Bitmap.java | 42 * Indicates that the bitmap was created for an unknown pixel density. 87 * density when running old apps. 90 public static void setDefaultDensity(int density) { argument 91 sDefaultDensity = density; 108 Bitmap(long nativeBitmap, int width, int height, int density, argument 122 if (density >= 0) { 123 mDensity = density; 154 * <p>Returns the density for this bitmap.</p> 156 * <p>The default density is the same density a 193 setDensity(int density) argument 1954 nativeWriteToParcel(long nativeBitmap, boolean isMutable, int density, Parcel p) argument [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
H A D | FlingAnimationUtils.java | 92 = MIN_VELOCITY_DP_PER_SECOND * ctx.getResources().getDisplayMetrics().density; 94 = HIGH_VELOCITY_DP_PER_SECOND * ctx.getResources().getDisplayMetrics().density;
|
/frameworks/base/core/java/android/content/pm/ |
H A D | LauncherApps.java | 807 * @param density The preferred density of the icon, zero for default density. Use 808 * density DPI values from {@link DisplayMetrics}. 818 public Drawable getShortcutIconDrawable(@NonNull ShortcutInfo shortcut, int density) { argument 843 shortcut.getIconResourceId(), shortcut.getUserHandle(), density); 850 icon.getResId(), shortcut.getUserHandle(), density); 865 UserHandle user, int density) { 872 return res.getDrawableForDensity(resId, density); 884 * @param density Optiona 864 loadDrawableResourceFromPackage(String packageName, int resId, UserHandle user, int density) argument 893 getShortcutBadgedIconDrawable(ShortcutInfo shortcut, int density) argument [all...] |
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/audio/ |
H A D | MediaEnvReverbTest.java | 272 //Test case 1.4: test diffusion and density 286 short density = mReverb.getDensity(); 287 assertTrue(msg +": got incorrect density", 288 ((float)density > (float)(500 / RATIO_TOLERANCE)) && 289 ((float)density < (float)(500 * RATIO_TOLERANCE)));
|