Searched refs:density (Results 76 - 100 of 228) sorted by relevance

12345678910

/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
H A DListActivity.java116 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f));
H A DTransparentListActivity.java114 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f));
H A DViewLayersActivity2.java61 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f));
H A DViewLayersActivity4.java65 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f));
H A DDisplayListLayersActivity.java79 return (int) (getResources().getDisplayMetrics().density * size + 0.5f);
/frameworks/base/tests/UiBench/src/com/android/test/uibench/
H A DGlTextureViewActivity.java55 mTextureView.setCameraDistance(distance * metrics.density);
/frameworks/base/tools/aapt2/filter/
H A DConfigFilter.cpp31 // 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 DActionMenuItemView.java78 final float density = res.getDisplayMetrics().density;
79 mMaxIconSize = (int) (MAX_ICON_SIZE * density + 0.5f);
H A DMenuPopupHelper.java269 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 DIconUtilities.java63 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 DResourcesCompat.java87 * 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 DActionMenuItemView.java80 final float density = res.getDisplayMetrics().density;
81 mMaxIconSize = (int) (MAX_ICON_SIZE * density + 0.5f);
H A DMenuPopupHelper.java281 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 DBitmapDrawable.java97 // 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 DDrawable.java192 * 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 DNinePatchDrawable.java70 /** 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 DSurfaceControl.java606 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 DResourceHelper.java289 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 DLockIcon.java109 final int density = newConfig.densityDpi;
110 if (density != mDensity) {
111 mDensity = density;
/frameworks/base/packages/EasterEgg/src/com/android/egg/neko/
H A DNekoDialog.java43 final float dp = context.getResources().getDisplayMetrics().density;
/frameworks/base/core/java/android/content/res/
H A DResources.java768 * 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 DBitmap.java42 * 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 DFlingAnimationUtils.java92 = 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 DLauncherApps.java807 * @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 DMediaEnvReverbTest.java272 //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)));

Completed in 546 milliseconds

12345678910