Home
last modified time | relevance | path

Searched refs:density (Results 1 – 25 of 336) sorted by relevance

12345678910>>...14

/frameworks/base/tools/aapt2/configuration/
DConfigurationParser_test.cpp77 <screen-density-groups>
78 <screen-density-group label="large" version-code-order="2">
79 <screen-density>xhdpi</screen-density>
80 <screen-density>xxhdpi</screen-density>
81 <screen-density>xxxhdpi</screen-density>
82 </screen-density-group>
83 <screen-density-group label="alldpi" version-code-order="1">
84 <screen-density>ldpi</screen-density>
85 <screen-density>mdpi</screen-density>
86 <screen-density>hdpi</screen-density>
[all …]
/frameworks/base/services/core/java/com/android/server/display/
DDensityMapping.java76 return left.density; in getDensityForResolution()
90 return (int) Math.round((diagonal - leftDiagonal) * (right.density - left.density) in getDensityForResolution()
91 / (rightDiagonal - leftDiagonal) + left.density); in getDensityForResolution()
106 } else if (prev.density > curr.density) { in verifyDensityMapping()
124 public final int density; field in DensityMapping.Entry
126 Entry(int width, int height, int density) { in Entry() argument
128 this.density = density; in Entry()
135 + ", density=" + density + '}'; in toString()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/battery/
DAccessorizedBatteryDrawableTest.kt35 val density = context.resources.displayMetrics.density in intrinsicSize_shieldFalse_isBatterySize() constant
36 assertThat(drawable.intrinsicHeight).isEqualTo((BATTERY_HEIGHT * density).toInt()) in intrinsicSize_shieldFalse_isBatterySize()
37 assertThat(drawable.intrinsicWidth).isEqualTo((BATTERY_WIDTH * density).toInt()) in intrinsicSize_shieldFalse_isBatterySize()
45 val density = context.resources.displayMetrics.density in intrinsicSize_shieldTrue_isBatteryPlusShieldSize() constant
47 .isEqualTo((BATTERY_HEIGHT_WITH_SHIELD * density).toInt()) in intrinsicSize_shieldTrue_isBatteryPlusShieldSize()
48 assertThat(drawable.intrinsicWidth).isEqualTo((BATTERY_WIDTH_WITH_SHIELD * density).toInt()) in intrinsicSize_shieldTrue_isBatteryPlusShieldSize()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/resources/
DIconLoader.java35 public IconLoader(String iconName, Density density, int platformVersion, LayoutDirection in IconLoader() argument
38 mDesiredDensity = density; in IconLoader()
85 for (Density density : Density.values()) { in getIcon()
86 if (density == mDesiredDensity) { in getIcon()
90 stream = getIcon(resourceDir, density); in getIcon()
92 mCurrentDensity = density; in getIcon()
103 private InputStream getIcon(String resourceDir, Density density) { in getIcon() argument
112 .append(density.getResourceValue()) in getIcon()
122 .append(density.getResourceValue()) in getIcon()
DSysUiResources.java70 String iconName, Density density, boolean isRtl, int color) { in loadIcon() argument
72 IconLoader iconLoader = new IconLoader(iconName, density, api, in loadIcon()
77 density = iconLoader.getDensity(); in loadIcon()
83 options.inDensity = density.getDpiValue(); in loadIcon()
/frameworks/layoutlib/bridge/
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/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/
DNavigationBar.java44 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
72 density, isRtl); in NavigationBar()
75 density, in NavigationBar()
79 loadIcon(recent, "ic_sysbar_recent.png", density, isRtl); in NavigationBar()
102 size *= context.getMetrics().density; in setSize()
136 sw /= metrics.density; in getShortestWidth()
/frameworks/base/core/java/android/util/
DDisplayMetrics.java322 public float density; field in DisplayMetrics
419 density = o.density; in setTo()
437 density = DENSITY_DEVICE / (float) DENSITY_DEFAULT; in setToDefaults()
439 scaledDensity = density; in setToDefaults()
444 noncompatDensity = density; in setToDefaults()
482 && density == other.density in equalsPhysical()
501 return "DisplayMetrics{density=" + density + ", width=" + widthPixels + in toString()
/frameworks/base/core/tests/coretests/src/android/util/
DTypedValueTest.kt149 metrics.density = 3.25f in <lambda>()
151 val height = 52 * metrics.density in <lambda>()
154 widthFloat / metrics.density, in <lambda>()
166 metrics.density = 1f in <lambda>()
168 metrics.scaledDensity = fontScale * metrics.density in <lambda>()
186 metrics.density = 1f in <lambda>()
188 metrics.scaledDensity = fontScale * metrics.density in <lambda>()
199 metrics.density = 1f in <lambda>()
201 metrics.scaledDensity = fontScale * metrics.density in <lambda>()
211 metrics.density = 1f in <lambda>()
[all …]
/frameworks/base/services/autofill/java/com/android/server/autofill/ui/
DBottomSheetLayout.java97 + " screenHeight: " + screenHeight / displayMetrics.density + ", screenWidth: " in onMeasure()
98 + screenWidth / displayMetrics.density in onMeasure()
99 + ", maxHeight: " + maxHeight / displayMetrics.density in onMeasure()
100 + ", maxWidth: " + maxWidth / displayMetrics.density + ", getMeasuredWidth(): " in onMeasure()
101 + getMeasuredWidth() / displayMetrics.density + ", getMeasuredHeight(): " in onMeasure()
102 + getMeasuredHeight() / displayMetrics.density); in onMeasure()
/frameworks/base/tools/aapt/tests/
DResourceFilter_test.cpp35 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/core/tests/coretests/src/android/content/res/
DFontScaleConverterActivityTest.java87 densityRef.compareAndSet(null, activity.getResources().getDisplayMetrics().density); in testFontsScaleNonLinearly()
89 var density = densityRef.get(); in testFontsScaleNonLinearly() local
90 assertThat(density).isNotNull(); in testFontsScaleNonLinearly()
93 15f * density, in testFontsScaleNonLinearly()
94 16f * density in testFontsScaleNonLinearly()
97 20f * density, in testFontsScaleNonLinearly()
98 36f * density in testFontsScaleNonLinearly()
101 35 * density, in testFontsScaleNonLinearly()
102 60 * density in testFontsScaleNonLinearly()
/frameworks/base/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/
DUserActionDistanceScopeImpl.kt45 override val density: Float in <lambda>() constant
46 get() = layoutImpl.density.density in <lambda>()
49 get() = layoutImpl.density.fontScale in <lambda>()
/frameworks/base/core/java/android/view/
DWindowMetrics.java79 public WindowMetrics(@NonNull Rect bounds, @NonNull WindowInsets windowInsets, float density) { in WindowMetrics() argument
82 mDensity = density; in WindowMetrics()
94 float density) { in WindowMetrics() argument
97 mDensity = density; in WindowMetrics()
/frameworks/base/tests/graphics/SilkFX/src/com/android/test/silkfx/common/
DBaseDrawingView.kt33 val density: Float constant in com.android.test.silkfx.common.BaseDrawingView
43 density = resources.displayMetrics.density
44 dp = { this * density } in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DConfigurationControllerImpl.kt36 private var density: Int = 0 variable
51 density = currentConfig.densityDpi
81 val density = newConfig.densityDpi in onConfigurationChanged() constant
84 if (density != this.density || fontScale != this.fontScale || in onConfigurationChanged()
89 this.density = density in onConfigurationChanged()
/frameworks/base/core/java/android/preference/
DPreferenceFrameLayout.java64 float density = context.getResources().getDisplayMetrics().density; in PreferenceFrameLayout() local
65 int defaultBorderTop = (int) (density * DEFAULT_BORDER_TOP + 0.5f); in PreferenceFrameLayout()
66 int defaultBottomPadding = (int) (density * DEFAULT_BORDER_BOTTOM + 0.5f); in PreferenceFrameLayout()
67 int defaultLeftPadding = (int) (density * DEFAULT_BORDER_LEFT + 0.5f); in PreferenceFrameLayout()
68 int defaultRightPadding = (int) (density * DEFAULT_BORDER_RIGHT + 0.5f); in PreferenceFrameLayout()
/frameworks/base/graphics/java/android/graphics/drawable/
DAnimatedImageDrawable.java213 if (srcDensityOverride > 0 && value.density > 0 in updateStateFromTypedArray()
214 && value.density != TypedValue.DENSITY_NONE) { in updateStateFromTypedArray()
215 if (value.density == srcDensityOverride) { in updateStateFromTypedArray()
216 value.density = r.getDisplayMetrics().densityDpi; in updateStateFromTypedArray()
218 value.density = in updateStateFromTypedArray()
219 (value.density * r.getDisplayMetrics().densityDpi) / srcDensityOverride; in updateStateFromTypedArray()
223 int density = Bitmap.DENSITY_NONE; in updateStateFromTypedArray() local
224 if (value.density == TypedValue.DENSITY_DEFAULT) { in updateStateFromTypedArray()
225 density = DisplayMetrics.DENSITY_DEFAULT; in updateStateFromTypedArray()
226 } else if (value.density != TypedValue.DENSITY_NONE) { in updateStateFromTypedArray()
[all …]
/frameworks/base/core/java/android/text/
DTextPaint.java37 public float density = 1.0f; field in TextPaint
72 density = tp.density; in set()
/frameworks/base/graphics/java/android/graphics/
DBitmapFactory.java579 final int density = value.density; in decodeResourceStream() local
580 if (density == TypedValue.DENSITY_DEFAULT) { in decodeResourceStream()
582 } else if (density != TypedValue.DENSITY_NONE) { in decodeResourceStream()
583 opts.inDensity = density; in decodeResourceStream()
715 final int density = opts.inDensity; in setDensityFromOptions() local
716 if (density != 0) { in setDensityFromOptions()
717 outputBitmap.setDensity(density); in setDensityFromOptions()
719 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in setDensityFromOptions()
/frameworks/base/tests/VoiceInteraction/src/com/android/test/voiceinteraction/
DAssistVisualizer.java81 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/tools/aapt2/split/
DTableSplitter.cpp42 without_density.density = 0; in CopyWithoutDensity()
53 if (config.density == 0) { in SplitValueSelector()
56 density_dependent_config_to_density_map_[CopyWithoutDensity(config)] = config.density; in SplitValueSelector()
70 if (config_value->config.density == 0 && !entry.second) { in SelectValues()
94 target_density.density = density_value_iter->second; in SelectValues()
138 target_density.density = preferred_density; in MarkNonPreferredDensitiesAsClaimed()
217 if (config_value->config.density != 0) { in SplitTable()
/frameworks/base/libs/hwui/
DFrameInfoVisualizer.cpp66 static int dpToPx(int dp, float density) { in dpToPx() argument
67 return (int)(dp * density + 0.5f); in dpToPx()
80 void FrameInfoVisualizer::setDensity(float density) { in setDensity() argument
81 if (CC_UNLIKELY(mDensity != density)) { in setDensity()
82 mDensity = density; in setDensity()
85 mVerticalUnit = static_cast<int>(dpToPx(PROFILE_DRAW_DP_PER_MS, density) * (float)16_ms / in setDensity()
87 mThresholdStroke = dpToPx(PROFILE_DRAW_THRESHOLD_STROKE_WIDTH, density); in setDensity()
/frameworks/base/core/java/android/window/
DWindowMetricsController.java83 final float density; in getWindowMetricsInternal() local
93 density = config.densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE; in getWindowMetricsInternal()
100 return new WindowMetrics(new Rect(bounds), insetsSupplier, density); in getWindowMetricsInternal()
175 final float density = currentDisplayInfo.logicalDensityDpi in getPossibleMaximumWindowMetrics() local
177 maxMetrics.add(new WindowMetrics(maxBounds, windowInsets, density)); in getPossibleMaximumWindowMetrics()
/frameworks/base/packages/SystemUI/src/com/android/systemui/battery/
DAccessorizedBatteryDrawable.kt60 private var density = context.resources.displayMetrics.density in <lambda>() variable
135 return (height * density).toInt() in <lambda>()
145 return (width * density).toInt() in <lambda>()
209 density = context.resources.displayMetrics.density in <lambda>()

12345678910>>...14