Home
last modified time | relevance | path

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

1234

/frameworks/base/core/java/android/text/
DBoringLayout.java42 BoringLayout.Metrics metrics, boolean includepad) { in make() argument
44 spacingmult, spacingadd, metrics, in make()
52 BoringLayout.Metrics metrics, boolean includepad, in make() argument
55 spacingmult, spacingadd, metrics, in make()
67 BoringLayout.Metrics metrics, in replaceOrMake() argument
77 metrics, includepad, true); in replaceOrMake()
89 BoringLayout.Metrics metrics, in replaceOrMake() argument
114 metrics, includepad, trust); in replaceOrMake() local
122 BoringLayout.Metrics metrics, boolean includepad) { in BoringLayout() argument
130 metrics, includepad, true); in BoringLayout()
[all …]
/frameworks/base/core/java/android/util/
DTypedValue.java241 public static float complexToDimension(int data, DisplayMetrics metrics) in complexToDimension() argument
246 metrics); in complexToDimension()
266 DisplayMetrics metrics) in complexToDimensionPixelOffset() argument
271 metrics); in complexToDimensionPixelOffset()
293 DisplayMetrics metrics) in complexToDimensionPixelSize() argument
299 metrics); in complexToDimensionPixelSize()
312 public static float complexToDimensionNoisy(int data, DisplayMetrics metrics) in complexToDimensionNoisy() argument
314 return complexToDimension(data, metrics); in complexToDimensionNoisy()
343 DisplayMetrics metrics) in applyDimension() argument
349 return value * metrics.density; in applyDimension()
[all …]
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DRenderAction.java108 DisplayMetrics metrics = new DisplayMetrics(); in init() local
109 metrics.densityDpi = metrics.noncompatDensityDpi = in init()
112 metrics.density = metrics.noncompatDensity = in init()
113 metrics.densityDpi / (float) DisplayMetrics.DENSITY_DEFAULT; in init()
115 metrics.scaledDensity = metrics.noncompatScaledDensity = metrics.density; in init()
117 metrics.widthPixels = metrics.noncompatWidthPixels = hardwareConfig.getScreenWidth(); in init()
118 metrics.heightPixels = metrics.noncompatHeightPixels = hardwareConfig.getScreenHeight(); in init()
119 metrics.xdpi = metrics.noncompatXdpi = hardwareConfig.getXdpi(); in init()
120 metrics.ydpi = metrics.noncompatYdpi = hardwareConfig.getYdpi(); in init()
125 mContext = new BridgeContext(mParams.getProjectKey(), metrics, resources, in init()
/frameworks/support/v7/appcompat/src/android/support/v7/internal/widget/
DContentFrameLayout.java80 final DisplayMetrics metrics = getContext().getResources().getDisplayMetrics(); in onMeasure() local
81 final boolean isPortrait = metrics.widthPixels < metrics.heightPixels; in onMeasure()
92 w = (int) tvw.getDimension(metrics); in onMeasure()
94 w = (int) tvw.getFraction(metrics.widthPixels, metrics.widthPixels); in onMeasure()
111 h = (int) tvh.getDimension(metrics); in onMeasure()
113 h = (int) tvh.getFraction(metrics.heightPixels, metrics.heightPixels); in onMeasure()
136 min = (int) tv.getDimension(metrics); in onMeasure()
138 min = (int) tv.getFraction(metrics.widthPixels, metrics.widthPixels); in onMeasure()
DResourcesWrapper.java228 public void updateConfiguration(Configuration config, DisplayMetrics metrics) { in updateConfiguration() argument
229 super.updateConfiguration(config, metrics); in updateConfiguration()
231 mResources.updateConfiguration(config, metrics); in updateConfiguration()
/frameworks/rs/
DrsScriptC_LibGL.cpp229 static void SetMetrics(Font::Rect *metrics, in SetMetrics() argument
232 *left = metrics->left; in SetMetrics()
235 *right = metrics->right; in SetMetrics()
238 *top = metrics->top; in SetMetrics()
241 *bottom = metrics->bottom; in SetMetrics()
250 Font::Rect metrics; in rsrMeasureTextAlloc() local
251 rsc->mStateFont.measureText(text, textLen, &metrics); in rsrMeasureTextAlloc()
252 SetMetrics(&metrics, left, right, top, bottom); in rsrMeasureTextAlloc()
259 Font::Rect metrics; in rsrMeasureText() local
260 rsc->mStateFont.measureText(text, textLen, &metrics); in rsrMeasureText()
[all …]
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/
DNavigationBar.java141 DisplayMetrics metrics = context.getMetrics(); in getShortestWidth() local
142 float sw = metrics.widthPixels < metrics.heightPixels ? in getShortestWidth()
143 metrics.widthPixels : metrics.heightPixels; in getShortestWidth()
144 sw /= metrics.density; in getShortestWidth()
DFrameworkActionBar.java141 DisplayMetrics metrics = mBridgeContext.getMetrics(); in createMenuPopup() local
157 layoutParams.setMarginEnd(getPixelValue("5dp", metrics)); in createMenuPopup()
231 static int getPixelValue(@NonNull String value, @NonNull DisplayMetrics metrics) { in getPixelValue() argument
233 return (int) typedValue.getDimension(metrics); in getPixelValue()
239 DisplayMetrics metrics = mBridgeContext.getMetrics(); in getActionBarHeight() local
251 return (int) typedValue.getDimension(metrics); in getActionBarHeight()
/frameworks/base/core/java/com/android/internal/widget/
DWeightedLinearLayout.java58 final DisplayMetrics metrics = getContext().getResources().getDisplayMetrics(); in onMeasure() local
59 final int screenWidth = metrics.widthPixels; in onMeasure()
60 final boolean isPortrait = screenWidth < metrics.heightPixels; in onMeasure()
/frameworks/base/tests/RenderScriptTests/PerfTest/src/com/android/perftest/
DTextTest.java85 DisplayMetrics metrics = mRes.getDisplayMetrics(); in initTextScript() local
89 Font.Style.NORMAL, 8.0f / metrics.density)); in initTextScript()
91 Font.Style.NORMAL, 8.0f / metrics.density)); in initTextScript()
/frameworks/base/core/jni/android/graphics/
DPaint.cpp491 static SkScalar getMetricsInternal(JNIEnv* env, jobject jpaint, Paint::FontMetrics *metrics) { in getMetricsInternal() argument
504 SkScalar spacing = paint->getFontMetrics(metrics); in getMetricsInternal()
512 metrics->fTop = -size * kElegantTop / 2048; in getMetricsInternal()
513 metrics->fBottom = -size * kElegantBottom / 2048; in getMetricsInternal()
514 metrics->fAscent = -size * kElegantAscent / 2048; in getMetricsInternal()
515 metrics->fDescent = -size * kElegantDescent / 2048; in getMetricsInternal()
516 metrics->fLeading = size * kElegantLeading / 2048; in getMetricsInternal()
517 spacing = metrics->fDescent - metrics->fAscent + metrics->fLeading; in getMetricsInternal()
524 Paint::FontMetrics metrics; in ascent() local
525 getMetricsInternal(env, paint, &metrics); in ascent()
[all …]
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/view/
DWindowManagerImpl.java30 public WindowManagerImpl(DisplayMetrics metrics) { in WindowManagerImpl() argument
31 mMetrics = metrics; in WindowManagerImpl()
/frameworks/base/core/java/android/view/
DViewConfiguration.java285 final DisplayMetrics metrics = res.getDisplayMetrics(); in ViewConfiguration() local
287 final float density = metrics.density; in ViewConfiguration()
364 final DisplayMetrics metrics = context.getResources().getDisplayMetrics(); in get() local
365 final int density = (int) (100.0f * metrics.density); in get()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DViewLayersActivity3.java57 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
58 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DViewLayersActivity4.java64 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
65 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DViewLayersActivity2.java60 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
61 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DListActivity.java115 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
116 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DTransparentListActivity.java113 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
114 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DViewLayersActivity.java110 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
111 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DViewLayersActivity5.java129 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
130 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
/frameworks/base/tests/TransformTest/src/com/google/android/test/transform/
DTransformTestActivity.java129 DisplayMetrics metrics = context.getResources().getDisplayMetrics(); in TransformView() local
130 mPosX = metrics.widthPixels/2; in TransformView()
131 mPosY = metrics.heightPixels/2; in TransformView()
/frameworks/support/v17/leanback/src/android/support/v17/leanback/app/
DErrorSupportFragment.java219 FontMetricsInt metrics = getFontMetricsInt(mTextView); in onCreateView() local
222 setTopMargin(mTextView, underImageBaselineMargin + metrics.ascent); in onCreateView()
226 setTopMargin(mButton, underMessageBaselineMargin - metrics.descent); in onCreateView()
DErrorFragment.java217 FontMetricsInt metrics = getFontMetricsInt(mTextView); in onCreateView() local
220 setTopMargin(mTextView, underImageBaselineMargin + metrics.ascent); in onCreateView()
224 setTopMargin(mButton, underMessageBaselineMargin - metrics.descent); in onCreateView()
/frameworks/base/telephony/java/android/telephony/
DSubscriptionInfo.java203 DisplayMetrics metrics = context.getResources().getDisplayMetrics(); in createIconBitmap() local
206 Bitmap workingBitmap = Bitmap.createBitmap(metrics, width, height, mIconBitmap.getConfig()); in createIconBitmap()
221 paint.setTextSize(TEXT_SIZE * metrics.density); in createIconBitmap()
/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/
DUiDevice.java133 DisplayMetrics metrics = new DisplayMetrics(); in getDisplaySizeDp() local
134 display.getRealMetrics(metrics); in getDisplaySizeDp()
135 float dpx = p.x / metrics.density; in getDisplaySizeDp()
136 float dpy = p.y / metrics.density; in getDisplaySizeDp()

1234