Home
last modified time | relevance | path

Searched refs:density (Results 1 – 25 of 82) 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()
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.java61 final DisplayDensityUtils density = new DisplayDensityUtils(getContext()); in onCreate() local
63 final int initialIndex = density.getCurrentIndex(); in onCreate()
74 mValues = density.getValues(); in onCreate()
75 mEntries = density.getEntries(); in onCreate()
77 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/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/Launcher3/src/com/android/launcher3/widget/util/
DWidgetSizes.java55 final float density = context.getResources().getDisplayMetrics().density; in getWidgetPaddedSizes() local
64 sizes.add(new SizeF(widgetSizePx.getWidth() / density, in getWidgetPaddedSizes()
65 widgetSizePx.getHeight() / density)); in getWidgetPaddedSizes()
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/
DEdgeTypePreferenceTest.java79 final float density = mContext.getResources().getDisplayMetrics().density; in onBindListItem_initSubtitleView() local
84 verify(mSubtitleView).setTextSize(32f * density); in onBindListItem_initSubtitleView()
/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/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/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/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/Launcher3/src/com/android/launcher3/icons/
DShortcutCachingLogic.java96 public static Drawable getIcon(Context context, ShortcutInfo shortcutInfo, int density) { in getIcon() argument
102 .getShortcutIconDrawable(shortcutInfo, density); in getIcon()
/packages/apps/Launcher3/src/com/android/launcher3/
DInvariantDeviceProfile.java448 int density = DisplayMetrics.DENSITY_XXXHIGH; in getLauncherIconDensity() local
453 density = densityBuckets[i]; in getLauncherIconDensity()
457 return density; in getLauncherIconDensity()
527 float availableWidth = config.screenWidthDp * res.getDisplayMetrics().density; in getDeviceProfile()
528 float availableHeight = config.screenHeightDp * res.getDisplayMetrics().density; in getDeviceProfile()
/packages/apps/UniversalMediaPlayer/java/com/android/pump/fragment/
DGenreFragment.java175 outRect.left = outRect.right = (int) Math.ceil(mXOffset * displayMetrics.density); in getItemOffsets()
177 outRect.bottom = (int) Math.ceil(mYOffset * displayMetrics.density); in getItemOffsets()
DSeriesFragment.java179 outRect.left = outRect.right = (int) Math.ceil(mXOffset * displayMetrics.density); in getItemOffsets()
181 outRect.bottom = (int) Math.ceil(mYOffset * displayMetrics.density); in getItemOffsets()
DMovieFragment.java184 outRect.left = outRect.right = (int) Math.ceil(mXOffset * displayMetrics.density); in getItemOffsets()
186 outRect.bottom = (int) Math.ceil(mYOffset * displayMetrics.density); in getItemOffsets()
DAlbumFragment.java179 outRect.left = outRect.right = (int) Math.ceil(mXOffset * displayMetrics.density); in getItemOffsets()
181 outRect.bottom = (int) Math.ceil(mYOffset * displayMetrics.density); in getItemOffsets()
DArtistFragment.java190 outRect.left = outRect.right = (int) Math.ceil(mXOffset * displayMetrics.density); in getItemOffsets()
192 outRect.bottom = (int) Math.ceil(mYOffset * displayMetrics.density); in getItemOffsets()
/packages/apps/Settings/src/com/android/settings/widget/
DChartGridView.java168 paint.density = res.getDisplayMetrics().density; in makeLabel()
/packages/apps/Dialer/java/com/android/incallui/answer/impl/utils/
DFlingAnimationUtils.java50 MIN_VELOCITY_DP_PER_SECOND * ctx.getResources().getDisplayMetrics().density; in FlingAnimationUtils()
52 HIGH_VELOCITY_DP_PER_SECOND * ctx.getResources().getDisplayMetrics().density; in FlingAnimationUtils()

1234