Home
last modified time | relevance | path

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

1234

/packages/apps/DeskClock/src/com/android/alarmclock/
DWidgetUtils.kt43 val density: Float = res.getDisplayMetrics().density in getScaleRatio() constant
45 density * minWidth / res.getDimension(R.dimen.min_digital_widget_width) in getScaleRatio()
72 val density: Float = res.getDisplayMetrics().density in getHeightScaleRatio() constant
73 val ratio: Float = density * minHeight / res.getDimension(R.dimen.min_digital_widget_height) in getHeightScaleRatio()
DWidgetUtils.java48 float density = res.getDisplayMetrics().density; in getScaleRatio() local
49 float ratio = (density * minWidth) / res.getDimension(R.dimen.min_digital_widget_width); in getScaleRatio()
86 float density = res.getDisplayMetrics().density; in getHeightScaleRatio() local
87 float ratio = density * minHeight / res.getDimension(R.dimen.min_digital_widget_height); in getHeightScaleRatio()
DDigitalAppWidgetProvider.java238 final float density = resources.getDisplayMetrics().density; in relayoutWidget() local
239 final int minWidthPx = (int) (density * options.getInt(OPTION_APPWIDGET_MIN_WIDTH)); in relayoutWidget()
240 final int minHeightPx = (int) (density * options.getInt(OPTION_APPWIDGET_MIN_HEIGHT)); in relayoutWidget()
241 final int maxWidthPx = (int) (density * options.getInt(OPTION_APPWIDGET_MAX_WIDTH)); in relayoutWidget()
242 final int maxHeightPx = (int) (density * options.getInt(OPTION_APPWIDGET_MAX_HEIGHT)); in relayoutWidget()
DDigitalAppWidgetProvider.kt351 val density: Float = resources.getDisplayMetrics().density in <lambda>() constant
352 val minWidthPx = (density * options.getInt(OPTION_APPWIDGET_MIN_WIDTH)).toInt() in <lambda>()
353 val minHeightPx = (density * options.getInt(OPTION_APPWIDGET_MIN_HEIGHT)).toInt() in <lambda>()
354 val maxWidthPx = (density * options.getInt(OPTION_APPWIDGET_MAX_WIDTH)).toInt() in <lambda>()
355 val maxHeightPx = (density * options.getInt(OPTION_APPWIDGET_MAX_HEIGHT)).toInt() in <lambda>()
/packages/apps/Settings/src/com/android/settings/display/
DScreenZoomSettings.java66 final DisplayDensityUtils density = new DisplayDensityUtils(getContext()); in onCreate() local
68 final int initialIndex = density.getCurrentIndex(); in onCreate()
79 mValues = density.getValues(); in onCreate()
80 mEntries = density.getEntries(); in onCreate()
82 mDefaultDensity = density.getDefaultDensity(); in onCreate()
DScreenZoomPreference.java38 final DisplayDensityUtils density = new DisplayDensityUtils(context); in ScreenZoomPreference() local
39 final int defaultIndex = density.getCurrentIndex(); in ScreenZoomPreference()
44 final String[] entries = density.getEntries(); in ScreenZoomPreference()
45 final int currentIndex = density.getCurrentIndex(); in ScreenZoomPreference()
DDensityPreference.java53 final float density = metrics.density; in getCurrentSwDp() local
55 return (int) (minDimensionPx / density); in getCurrentSwDp()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/display/
DScreenZoomSettings.java66 final DisplayDensityUtils density = new DisplayDensityUtils(getContext()); in onCreate() local
68 final int initialIndex = density.getCurrentIndex(); in onCreate()
79 mValues = density.getValues(); in onCreate()
80 mEntries = density.getEntries(); in onCreate()
82 mDefaultDensity = density.getDefaultDensity(); in onCreate()
DScreenZoomPreference.java38 final DisplayDensityUtils density = new DisplayDensityUtils(context); in ScreenZoomPreference() local
39 final int defaultIndex = density.getCurrentIndex(); in ScreenZoomPreference()
44 final String[] entries = density.getEntries(); in ScreenZoomPreference()
45 final int currentIndex = density.getCurrentIndex(); in ScreenZoomPreference()
DDensityPreference.java53 final float density = metrics.density; in getCurrentSwDp() local
55 return (int) (minDimensionPx / density); in getCurrentSwDp()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
DTouchTargetEnforcer.java45 public TouchTargetEnforcer(float density) { in TouchTargetEnforcer() argument
46 this(density, TouchDelegate::new); in TouchTargetEnforcer()
55 TouchTargetEnforcer(float density, TouchDelegateProvider touchDelegateProvider) { in TouchTargetEnforcer() argument
56 mDensity = density; in TouchTargetEnforcer()
/packages/apps/TV/src/com/android/tv/dvr/ui/playback/
DDvrPlaybackActivity.java71 float density = getResources().getDisplayMetrics().density; in onConfigurationChanged() local
73 (int) (newConfig.screenWidthDp * density), in onConfigurationChanged()
74 (int) (newConfig.screenHeightDp * density)); in onConfigurationChanged()
/packages/apps/Launcher3/src/com/android/launcher3/widget/
DWidgetHostViewLoader.java161 float density = context.getResources().getDisplayMetrics().density; in getDefaultOptionsForWidget() local
162 int xPaddingDips = (int) ((padding.left + padding.right) / density); in getDefaultOptionsForWidget()
163 int yPaddingDips = (int) ((padding.top + padding.bottom) / density); in getDefaultOptionsForWidget()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/accessibility/
DPresetPreference.java58 final float density = getContext().getResources().getDisplayMetrics().density; in onBindListItem() local
59 previewText.setTextSize(DEFAULT_FONT_SIZE * density); in onBindListItem()
DEdgeTypePreference.java61 final float density = getContext().getResources().getDisplayMetrics().density; in onBindListItem() local
62 preview.setTextSize(DEFAULT_FONT_SIZE * density); in onBindListItem()
/packages/apps/Settings/src/com/android/settings/accessibility/
DPresetPreference.java58 final float density = getContext().getResources().getDisplayMetrics().density; in onBindListItem() local
59 previewText.setTextSize(DEFAULT_FONT_SIZE * density); in onBindListItem()
DEdgeTypePreference.java61 final float density = getContext().getResources().getDisplayMetrics().density; in onBindListItem() local
62 preview.setTextSize(DEFAULT_FONT_SIZE * density); in onBindListItem()
/packages/apps/Contacts/src/com/android/contacts/
DShortcutIntentBuilder.java405 final float density = r.getDisplayMetrics().density; in generatePhoneNumberIcon() local
459 final int left = (int) (mIconSize - (45 * density)); in generatePhoneNumberIcon()
460 final int top = (int) (21 * density); in generatePhoneNumberIcon()
463 dst.set(iconWidth - ((int) (20 * density)), -1, in generatePhoneNumberIcon()
464 iconWidth, ((int) (19 * density))); in generatePhoneNumberIcon()
/packages/apps/Launcher3/src/com/android/launcher3/
DAppWidgetResizeFrame.java367 final float density = context.getResources().getDisplayMetrics().density; in getWidgetSizeRanges() local
370 int landWidth = (int) ((spanX * sCellSize[0].x) / density); in getWidgetSizeRanges()
371 int landHeight = (int) ((spanY * sCellSize[0].y) / density); in getWidgetSizeRanges()
374 int portWidth = (int) ((spanX * sCellSize[1].x) / density); in getWidgetSizeRanges()
375 int portHeight = (int) ((spanY * sCellSize[1].y) / density); in getWidgetSizeRanges()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/
DAppWidgetPickActivity.java103 final int density = res.getDisplayMetrics().densityDpi; in createItem() local
105 switch (density) { in createItem()
119 iconDensity = (int)((density*0.75f)+.5f); in createItem()
/packages/apps/Settings/src/com/android/settings/
DAppWidgetPickActivity.java103 final int density = res.getDisplayMetrics().densityDpi; in createItem() local
105 switch (density) { in createItem()
119 iconDensity = (int)((density*0.75f)+.5f); in createItem()
/packages/apps/Dialer/java/com/android/dialer/common/
DDpUtil.java25 return px / context.getResources().getDisplayMetrics().density; in pxToDp()
29 return dp * context.getResources().getDisplayMetrics().density; in dpToPx()
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DTimeBar.java98 float textSizeInPx = metrics.density * TEXT_SIZE_IN_DP; in TimeBar()
108 mScrubberPadding = (int) (metrics.density * SCRUBBER_PADDING_IN_DP); in TimeBar()
110 mVPaddingInPx = (int) (metrics.density * V_PADDING_IN_DP); in TimeBar()
/packages/apps/DocumentsUI/src/com/android/documentsui/base/
DDisplay.java40 public static float density(Context context) { in density() method in Display
41 return context.getResources().getDisplayMetrics().density; in density()
/packages/apps/Launcher3/src_shortcuts_overrides/com/android/launcher3/shortcuts/
DDeepShortcutManager.java126 public Drawable getShortcutIconDrawable(ShortcutInfo shortcutInfo, int density) { in getShortcutIconDrawable() argument
128 return mLauncherApps.getShortcutIconDrawable(shortcutInfo, density); in getShortcutIconDrawable()

1234