Searched refs:density (Results 1 - 25 of 216) sorted by relevance

123456789

/frameworks/base/tools/layoutlib/bridge/
H A 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/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/
H A DIconLoader.java34 IconLoader(String iconName, Density density, int platformVersion, LayoutDirection direction) { argument
36 mDesiredDensity = density;
56 * Should only be called after {@link #getIcon()}. Returns the density of the icon, if found by
73 * If a match is found, mCurrentDensity will be set to the icon's density.
76 // First check for the desired density.
82 // Didn't find in the desired density. Search in all.
83 for (Density density : Density.values()) {
84 if (density == mDesiredDensity) {
85 // Skip the desired density since it's already been checked.
88 stream = getIcon(resourceDir, density);
101 getIcon(String resourceDir, Density density) argument
[all...]
H A DNavigationBar.java44 public NavigationBar(BridgeContext context, Density density, int orientation, boolean isRtl, argument
46 this(context, density, orientation, isRtl, rtlEnabled, simulatedPlatformVersion,
50 protected NavigationBar(BridgeContext context, Density density, int orientation, boolean isRtl, argument
70 loadIcon(back, "ic_sysbar_back.png", density, isRtl);
72 loadIcon(3, "ic_sysbar_home.png", density, isRtl);
74 loadIcon(recent, "ic_sysbar_recent.png", density, isRtl);
96 size *= context.getMetrics().density;
130 sw /= metrics.density;
/frameworks/support/compat/ics-mr1/android/support/v4/content/res/
H A DResourcesCompatIcsMr1.java25 public static Drawable getDrawableForDensity(Resources res, int id, int density) argument
27 return res.getDrawableForDensity(id, density);
/frameworks/base/core/java/android/util/
H A DDisplayMetrics.java24 * size, density, and font scaling.
31 * Standard quantized DPI for low-density screens.
36 * Standard quantized DPI for medium-density screens.
41 * This is a secondary density, added for some common screen configurations.
43 * class density -- that is, don't supply specific graphics for this
44 * density, instead allow the platform to scale from other densities
51 * <p>This density was original introduced to correspond with a
52 * 720p TV screen: the density for 1080p televisions is
60 * Standard quantized DPI for high-density screens.
65 * Intermediate density fo
203 public float density; field in class:DisplayMetrics
[all...]
/frameworks/base/core/java/android/text/
H A DTextPaint.java35 public float density = 1.0f; field in class:TextPaint
71 density = tp.density;
/frameworks/support/frameworks/support/samples/SupportLeanbackShowcase/app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/utils/
H A DUtils.java30 float density = ctx.getResources().getDisplayMetrics().density;
31 return Math.round((float) dp * density);
/frameworks/support/samples/SupportLeanbackShowcase/app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/utils/
H A DUtils.java30 float density = ctx.getResources().getDisplayMetrics().density;
31 return Math.round((float) dp * density);
/frameworks/support/compat/api21/android/support/v4/content/res/
H A DResourcesCompatApi21.java30 public static Drawable getDrawableForDensity(Resources res, int id, int density, Theme theme) argument
32 return res.getDrawableForDensity(id, density, theme);
/frameworks/base/core/java/android/content/pm/
H A DLauncherActivityInfo.java97 * @param density The preferred density of the icon, zero for default density. Use
98 * density DPI values from {@link DisplayMetrics}.
103 public Drawable getIcon(int density) { argument
106 // Get the preferred density icon from the app's resources
107 if (density != 0 && iconRes != 0) {
111 icon = resources.getDrawableForDensity(iconRes, density);
115 // Get the default density icon
165 * @param density Optiona
170 getBadgedIcon(int density) argument
[all...]
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
H A DBitmapFactory_Delegate.java55 Density density = Density.MEDIUM;
58 density = Density.getEnum(opts.inDensity);
76 density);
92 bm = Bitmap_Delegate.createBitmap(is, bitmapCreateFlags, density);
127 * Set the newly decoded bitmap's density based on the Options.
135 final int density = opts.inDensity;
136 if (density != 0) {
137 outputBitmap.setDensity(density);
139 if (targetDensity == 0 || density == targetDensity || density
[all...]
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/
H A DDisplay.java38 * Returns logical density of the display.
40 public static float density(Context context) { method in class:Display
41 return context.getResources().getDisplayMetrics().density;
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/
H A DDisplayDensityUtils.java37 * Utility methods for working with display density.
42 /** Minimum increment between density scales. */
45 /** Minimum density scale. This is available on all devices. */
48 /** Maximum density scale. The actual scale used depends on the device. */
124 final int density = ((int) (defaultDensity * (1 - (i + 1) * interval))) & ~1;
125 if (currentDensity == density) {
129 values[curIndex] = density;
145 final int density = ((int) (defaultDensity * (1 + (i + 1) * interval))) & ~1;
146 if (currentDensity == density) {
149 values[curIndex] = density;
238 setForcedDisplayDensity(final int displayId, final int density) argument
[all...]
/frameworks/support/compat/gingerbread/android/support/v4/content/res/
H A DConfigurationHelperGingerbread.java28 return (int) (metrics.heightPixels / metrics.density);
33 return (int) (metrics.widthPixels / metrics.density);
/frameworks/native/include/ui/
H A DDisplayInfo.h34 float density; member in struct:android::DisplayInfo
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
H A DSpTexts.java44 final float density = res.getDisplayMetrics().density;
46 final int sp = (int)(px / fontScale / density);
/frameworks/base/cmds/wm/src/com/android/commands/wm/
H A DWm.java55 " wm density [reset|DENSITY]\n" +
63 "wm density: override display density.\n" +
89 } else if (op.equals("density")) {
175 int density;
180 System.out.println("Physical density: " + initialDensity);
182 System.out.println("Override density: " + baseDensity);
188 density = -1;
191 density = Integer.parseInt(densityStr);
196 if (density < 7
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DBitmapFactory.java76 * size post scaling (for density / sample size) is smaller.</p>
175 * The pixel density to use for the bitmap. This will always result
176 * in the returned bitmap having a density set for it (see
179 * density does not match {@link #inTargetDensity}, then the bitmap
180 * will be scaled to the target density before being returned.
186 * will fill in the density associated with the resource. The other
187 * functions will leave it as-is and no density will be applied.
198 * The pixel density of the destination this bitmap will be drawn to.
207 * will fill in the density associated the Resources object's
209 * functions will leave it as-is and no scaling for density wil
[all...]
/frameworks/base/core/java/android/preference/
H A DPreferenceFrameLayout.java57 float density = context.getResources().getDisplayMetrics().density;
58 int defaultBorderTop = (int) (density * DEFAULT_BORDER_TOP + 0.5f);
59 int defaultBottomPadding = (int) (density * DEFAULT_BORDER_BOTTOM + 0.5f);
60 int defaultLeftPadding = (int) (density * DEFAULT_BORDER_LEFT + 0.5f);
61 int defaultRightPadding = (int) (density * DEFAULT_BORDER_RIGHT + 0.5f);
/frameworks/support/core-ui/java/android/support/v4/widget/
H A DCircleImageView.java52 final float density = getContext().getResources().getDisplayMetrics().density;
53 final int shadowYOffset = (int) (density * Y_OFFSET);
54 final int shadowXOffset = (int) (density * X_OFFSET);
56 mShadowRadius = (int) (density * SHADOW_RADIUS);
61 ViewCompat.setElevation(this, SHADOW_ELEVATION * density);
/frameworks/base/packages/SystemUI/src/com/android/systemui/
H A DAutoReinflateContainer.java32 * Currently supports changes to density and locale.
59 final int density = newConfig.densityDpi;
60 if (density != mDensity) {
61 mDensity = density;
/frameworks/support/compat/java/android/support/v4/content/res/
H A DResourcesCompat.java69 * the given screen density in DPI and styled for the specified theme.
71 * Prior to API level 15, the theme and density will not be applied and
80 * @param density The desired screen density indicated by the resource as
91 int density, @Nullable Theme theme) throws NotFoundException {
93 return ResourcesCompatApi21.getDrawableForDensity(res, id, density, theme);
95 return ResourcesCompatIcsMr1.getDrawableForDensity(res, id, density);
90 getDrawableForDensity(@onNull Resources res, @DrawableRes int id, int density, @Nullable Theme theme) argument
/frameworks/base/core/java/android/view/
H A DViewConfiguration.java134 * applications that do not provide a Context for determining density/configuration-dependent
155 * applications that do not provide a Context for determining density/configuration-dependent
275 * various parameters of the context, like the dimension of the display or the density
287 final float density = metrics.density;
290 sizeAndDensity = density * 1.5f;
292 sizeAndDensity = density;
297 mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f);
359 * density of the display.
365 final int density
[all...]
/frameworks/base/libs/androidfw/tests/data/basic/
H A DR.h40 density = 0x7f030002, // default enumerator in enum:base::R::string::__anon1043
/frameworks/base/core/java/android/app/
H A DIActivityContainer.aidl29 void setSurface(in Surface surface, int width, int height, int density);

Completed in 1073 milliseconds

123456789