Searched defs:density (Results 1 - 25 of 58) sorted by relevance

123

/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/support/v4/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/support/v4/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/support/v4/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/text/
H A DTextPaint.java35 public float density = 1.0f; field in class:TextPaint
71 density = tp.density;
/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 DStatusBar.java64 public StatusBar(BridgeContext context, Density density, boolean isRtl, boolean rtlEnabled, argument
82 + Config.getWifiIconType(simulatedPlatformVersion), density);
83 loadIcon(2, "stat_sys_battery_100.png", density);
89 protected void loadIcon(int index, String iconName, Density density) { argument
91 super.loadIcon(index, iconName, density);
H A DCustomBar.java101 protected void loadIcon(int index, String iconName, Density density) { argument
102 loadIcon(index, iconName, density, false);
105 protected void loadIcon(int index, String iconName, Density density, boolean isRtl) { argument
111 IconLoader iconLoader = new IconLoader(iconName, density, mSimulatedPlatformVersion,
116 density = iconLoader.getDensity();
122 bitmap = Bitmap_Delegate.createBitmap(stream, false /*isMutable*/, density);
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/native/include/ui/
H A DDisplayInfo.h34 float density; member in struct:android::DisplayInfo
/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/libs/androidfw/tests/
H A DConfig_test.cpp45 static ResTable_config buildDensityConfig(int density) { argument
48 config.density = uint16_t(density);
56 deviceConfig.density = ResTable_config::DENSITY_XHIGH;
/frameworks/base/libs/androidfw/tests/data/basic/
H A DR.h40 density = 0x7f030002, // default enumerator in enum:base::R::string::__anon1037
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/
H A DDisplayDensityUtils.java35 * Utility methods for working with display density.
40 /** Minimum increment between density scales. */
43 /** Minimum density scale. This is available on all devices. */
46 /** Maximum density scale. The actual scale used depends on the device. */
120 final int density = ((int) (defaultDensity * (1 - (i + 1) * interval))) & ~1;
121 if (currentDensity == density) {
125 values[curIndex] = density;
141 final int density = ((int) (defaultDensity * (1 + (i + 1) * interval))) & ~1;
142 if (currentDensity == density) {
145 values[curIndex] = density;
230 setForcedDisplayDensity(final int displayId, final int density) argument
[all...]
/frameworks/base/core/java/android/appwidget/
H A DAppWidgetProviderInfo.java260 * provide a desired density such as {@link android.util.DisplayMetrics#DENSITY_LOW}
261 * {@link android.util.DisplayMetrics#DENSITY_MEDIUM}, etc. If no density is
262 * provided, the density of the current display will be used.
269 * @param density The optional desired density as per
273 public final Drawable loadIcon(@NonNull Context context, int density) { argument
274 return loadDrawable(context, density, providerInfo.getIconResource(), true);
279 * A client can optionally provide a desired density such as
281 * {@link android.util.DisplayMetrics#DENSITY_MEDIUM}, etc. If no density is
282 * provided, the density o
293 loadPreviewImage(@onNull Context context, int density) argument
364 loadDrawable(Context context, int density, int resourceId, boolean loadDefaultIcon) argument
[all...]
/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
181 public float density; field in class:DisplayMetrics
[all...]
H A DTypedValue.java156 * If {@link #density} is equal to this value, then the density should be
157 * treated as the system's default density value: {@link DisplayMetrics#DENSITY_DEFAULT}.
162 * If {@link #density} is equal to this value, then there is no density
194 * If the Value came from a resource, this holds the corresponding pixel density.
196 public int density; field in class:TypedValue
239 * supplies display density and scaling information.
263 * supplies display density and scaling information.
290 * supplies display density an
[all...]
/frameworks/base/libs/hwui/
H A DFrameInfoVisualizer.cpp64 static int dpToPx(int dp, float density) { argument
65 return (int) (dp * density + 0.5f);
77 void FrameInfoVisualizer::setDensity(float density) { argument
78 if (CC_UNLIKELY(mDensity != density)) {
79 mDensity = density;
80 mVerticalUnit = dpToPx(PROFILE_DRAW_DP_PER_MS, density);
81 mThresholdStroke = dpToPx(PROFILE_DRAW_THRESHOLD_STROKE_WIDTH, density);
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
H A DResourceHelper.java282 Density density = Density.MEDIUM;
284 density =
294 new FileInputStream(file), density, value.isFramework(),
341 density);
369 private static Drawable getNinePatchDrawable(InputStream inputStream, Density density, argument
393 density);
H A DLayout.java133 Density density = hwConfig.getDensity();
139 navBar = createNavBar(getContext(), density, isRtl, getParams().isRtlSupported(),
145 statusBar = createStatusBar(getContext(), density, isRtl, getParams().isRtlSupported(),
221 private StatusBar createStatusBar(BridgeContext context, Density density, boolean isRtl, argument
224 new StatusBar(context, density, isRtl, isRtlSupported, simulatedPlatformVersion);
279 private NavigationBar createNavBar(BridgeContext context, Density density, boolean isRtl, argument
283 NavigationBar navBar = new NavigationBar(context, density, orientation, isRtl,
/frameworks/base/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/setup/
H A DConfigGenerator.java283 public ConfigGenerator setDensity(Density density) { argument
284 mDensity = density;
/frameworks/wilhelm/src/itf/
H A DIEnvironmentalReverb.c580 SLpermille density)
584 if (!(0 <= density && density <= 1000)) {
589 thiz->mProperties.density = density;
597 REVERB_PARAM_DENSITY, &density);
625 REVERB_PARAM_DENSITY, &thiz->mProperties.density);
629 *pDensity = thiz->mProperties.density;
669 if (!(0 <= properties.density && properties.density <
579 IEnvironmentalReverb_SetDensity(SLEnvironmentalReverbItf self, SLpermille density) argument
[all...]
/frameworks/base/core/java/android/view/
H A DDisplayListCanvas.java94 mDensity = 0; // disable bitmap density scaling
106 public void setDensity(int density) { argument
107 // drop silently, since DisplayListCanvas doesn't perform density scaling
/frameworks/base/media/java/android/media/audiofx/
H A DEnvironmentalReverb.java367 * Sets the echo density in the late reverberation decay.
398 * Controls the modal density of the late reverberation decay.
400 * A lower density creates a hollow sound that is useful for simulating small reverberation
402 * @param density density specified using a permille scale. The valid range is [0, 1000].
409 public void setDensity(short density) argument
411 byte[] param = shortToByteArray(density);
416 * Gets the density level.
417 * @return the density level. See {@link #setDiffusion(short)} for units.
511 public short density; field in class:EnvironmentalReverb.Settings
[all...]
/frameworks/base/native/android/
H A Dconfiguration.cpp71 return config->density;
163 void AConfiguration_setDensity(AConfiguration* config, int32_t density) { argument
164 config->density = density;

Completed in 717 milliseconds

123