Home
last modified time | relevance | path

Searched refs:metrics (Results 1 – 25 of 39) sorted by relevance

12

/packages/apps/Settings/src/com/android/settings/display/
DDensityPreference.java46 final DisplayMetrics metrics = res.getDisplayMetrics(); in getCurrentSwDp() local
47 final float density = metrics.density; in getCurrentSwDp()
48 final int minDimensionPx = Math.min(metrics.widthPixels, metrics.heightPixels); in getCurrentSwDp()
69 final DisplayMetrics metrics = res.getDisplayMetrics(); in onDialogClosed() local
71 final int minDimensionPx = Math.min(metrics.widthPixels, metrics.heightPixels); in onDialogClosed()
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/
DStringTexture.java37 FontMetricsInt metrics, int width, int height) { in StringTexture() argument
41 mMetrics = metrics; in StringTexture()
73 FontMetricsInt metrics = paint.getFontMetricsInt(); in newInstance() local
75 int height = metrics.bottom - metrics.top; in newInstance()
79 return new StringTexture(text, paint, metrics, width, height); in newInstance()
/packages/apps/Settings/src/com/android/settings/
DDisplay.java67 DisplayMetrics metrics = getResources().getDisplayMetrics(); in onCreate() local
69 mDisplayMetrics.density = metrics.density; in onCreate()
70 mDisplayMetrics.heightPixels = metrics.heightPixels; in onCreate()
71 mDisplayMetrics.scaledDensity = metrics.scaledDensity; in onCreate()
72 mDisplayMetrics.widthPixels = metrics.widthPixels; in onCreate()
73 mDisplayMetrics.xdpi = metrics.xdpi; in onCreate()
74 mDisplayMetrics.ydpi = metrics.ydpi; in onCreate()
/packages/apps/DevCamera/src/com/android/devcamera/
DCameraDeviceReport.java381 DisplayMetrics metrics = new DisplayMetrics(); in printDisplayInfo() local
383 windowMgr.getDefaultDisplay().getMetrics(metrics); in printDisplayInfo()
384 Log.v(TAG, "screen width pixels = " + metrics.widthPixels); in printDisplayInfo()
385 Log.v(TAG, "screen height pixels = " + metrics.heightPixels); in printDisplayInfo()
387 windowMgr.getDefaultDisplay().getRealMetrics(metrics); in printDisplayInfo()
388 Log.v(TAG, "real screen width pixels = " + metrics.widthPixels); in printDisplayInfo()
389 Log.v(TAG, "real screen height pixels = " + metrics.heightPixels); in printDisplayInfo()
DDevCameraActivity.java297 DisplayMetrics metrics = new DisplayMetrics(); in displayWidth() local
298 this.getWindowManager().getDefaultDisplay().getRealMetrics(metrics); in displayWidth()
299 return metrics.widthPixels; in displayWidth()
303 DisplayMetrics metrics = new DisplayMetrics(); in displayHeight() local
304 this.getWindowManager().getDefaultDisplay().getRealMetrics(metrics); in displayHeight()
305 return metrics.heightPixels; in displayHeight()
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/data/
DMtpBitmapFetch.java108 DisplayMetrics metrics = new DisplayMetrics(); in configureForContext() local
110 wm.getDefaultDisplay().getMetrics(metrics); in configureForContext()
111 sMaxSize = Math.max(metrics.heightPixels, metrics.widthPixels); in configureForContext()
/packages/apps/Gallery2/src/com/android/gallery3d/util/
DGalleryUtils.java80 DisplayMetrics metrics = new DisplayMetrics(); in initialize() local
83 wm.getDefaultDisplay().getMetrics(metrics); in initialize()
84 sPixelDensity = metrics.density; in initialize()
88 initializeThumbnailSizes(metrics, r); in initialize()
91 private static void initializeThumbnailSizes(DisplayMetrics metrics, Resources r) { in initializeThumbnailSizes() argument
92 int maxPixels = Math.max(metrics.heightPixels, metrics.widthPixels); in initializeThumbnailSizes()
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/colorpicker/
DColorPickerDialog.java48 DisplayMetrics metrics = new DisplayMetrics(); in ColorPickerDialog() local
50 wm.getDefaultDisplay().getMetrics(metrics); in ColorPickerDialog()
51 int height = metrics.heightPixels*8/10; in ColorPickerDialog()
52 int width = metrics.widthPixels*8/10; in ColorPickerDialog()
DColorCompareView.java61 DisplayMetrics metrics = ctx.getResources().getDisplayMetrics(); in ColorCompareView() local
62 float mDpToPix = metrics.density; in ColorCompareView()
DColorValueView.java59 DisplayMetrics metrics = ctx.getResources().getDisplayMetrics(); in ColorValueView() local
60 float mDpToPix = metrics.density; in ColorValueView()
DColorSaturationView.java65 DisplayMetrics metrics = ctx.getResources().getDisplayMetrics(); in ColorSaturationView() local
66 float mDpToPix = metrics.density; in ColorSaturationView()
DColorOpacityView.java63 DisplayMetrics metrics = ctx.getResources().getDisplayMetrics(); in ColorOpacityView() local
64 float mDpToPix = metrics.density; in ColorOpacityView()
DColorBrightnessView.java65 DisplayMetrics metrics = ctx.getResources().getDisplayMetrics(); in ColorBrightnessView() local
66 float mDpToPix = metrics.density; in ColorBrightnessView()
DColorHueView.java66 DisplayMetrics metrics = ctx.getResources().getDisplayMetrics(); in ColorHueView() local
67 float mDpToPix = metrics.density; in ColorHueView()
DColorSVRectView.java65 DisplayMetrics metrics = ctx.getResources().getDisplayMetrics(); in ColorSVRectView() local
66 mDpToPix = metrics.density; in ColorSVRectView()
/packages/apps/Gallery/src/com/android/camera/
DGridViewSpecial.java81 DisplayMetrics metrics) { in LayoutSpec() argument
82 mCellWidth = dpToPx(w, metrics); in LayoutSpec()
83 mCellHeight = dpToPx(h, metrics); in LayoutSpec()
84 mCellSpacing = dpToPx(intercellSpacing, metrics); in LayoutSpec()
85 mLeftEdgePadding = dpToPx(leftEdgePadding, metrics); in LayoutSpec()
96 DisplayMetrics metrics = new DisplayMetrics(); in initCellSize() local
97 a.getWindowManager().getDefaultDisplay().getMetrics(metrics); in initCellSize()
99 new LayoutSpec(67, 67, 8, 0, metrics), in initCellSize()
100 new LayoutSpec(92, 92, 8, 0, metrics), in initCellSize()
105 private static int dpToPx(int dp, DisplayMetrics metrics) { in dpToPx() argument
[all …]
/packages/services/Car/car-support-lib/src/android/support/car/ui/
DCarUiResourceLoader.java41 Context context, String drawableName, DisplayMetrics metrics) { in getDrawable() argument
55 if (metrics == null) { in getDrawable()
58 return res.getDrawableForDensity(id, metrics.densityDpi, null); in getDrawable()
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DTimeBar.java97 DisplayMetrics metrics = context.getResources().getDisplayMetrics(); in TimeBar() local
98 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/services/Car/car-support-lib/src/android/support/car/app/menu/
DUtils.java25 public static Bitmap snapshot(DisplayMetrics metrics, Drawable drawable) { in snapshot() argument
28 Bitmap bitmap = Bitmap.createBitmap(metrics, width, height, Bitmap.Config.ARGB_8888); in snapshot()
DCarDrawerActivity.java307 DisplayMetrics metrics = getResources().getDisplayMetrics();
310 Utils.snapshot(metrics, leftIcon));
315 Utils.snapshot(metrics, rightIcon));
DCarMenu.java38 public CarMenu(DisplayMetrics metrics) { in CarMenu() argument
39 mMetrics = metrics; in CarMenu()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/
DSetupLayoutActivity.java196 DisplayMetrics metrics = new DisplayMetrics(); in getScreenWidth() local
197 mActivity.getWindowManager().getDefaultDisplay().getMetrics(metrics); in getScreenWidth()
198 return metrics.widthPixels; in getScreenWidth()
/packages/apps/Terminal/src/com/android/terminal/
DTerminalLineView.java40 public TerminalLineView(Context context, Terminal term, TerminalMetrics metrics) { in TerminalLineView() argument
43 mMetrics = metrics; in TerminalLineView()
/packages/apps/Launcher3/src/com/android/launcher3/
DUtilities.java757 public static float dpiFromPx(int size, DisplayMetrics metrics){ in dpiFromPx() argument
758 float densityRatio = (float) metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT; in dpiFromPx()
761 public static int pxFromDp(float size, DisplayMetrics metrics) { in pxFromDp() argument
763 size, metrics)); in pxFromDp()
765 public static int pxFromSp(float size, DisplayMetrics metrics) { in pxFromSp() argument
767 size, metrics)); in pxFromSp()
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/
DPicasaSource.java96 DisplayMetrics metrics = new DisplayMetrics(); in getDisplayLongSide() local
99 wm.getDefaultDisplay().getMetrics(metrics); in getDisplayLongSide()
100 return Math.max(metrics.heightPixels, metrics.widthPixels); in getDisplayLongSide()

12