Home
last modified time | relevance | path

Searched refs:getIntrinsicWidth (Results 1 – 25 of 47) sorted by relevance

12

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DInsetDrawableTest.java330 assertEquals((int)(mPassDrawable.getIntrinsicWidth() / (1 - 2 * inset)), in testIsBoundsAndIntrinsicSizeInverse()
331 insetDrawable.getIntrinsicWidth()); in testIsBoundsAndIntrinsicSizeInverse()
335 Rect r = new Rect(0, 0, insetDrawable.getIntrinsicWidth(), in testIsBoundsAndIntrinsicSizeInverse()
340 assertEquals((int)(insetDrawable.getIntrinsicWidth() * inset), r.left); in testIsBoundsAndIntrinsicSizeInverse()
342 assertEquals(insetDrawable.getIntrinsicWidth() in testIsBoundsAndIntrinsicSizeInverse()
343 - (int)((inset) * insetDrawable.getIntrinsicWidth()), r.right); in testIsBoundsAndIntrinsicSizeInverse()
348 assertEquals(r.width(), mPassDrawable.getIntrinsicWidth(), 1); in testIsBoundsAndIntrinsicSizeInverse()
361 int expected = mPassDrawable.getIntrinsicWidth(); in testGetIntrinsicWidth()
362 assertEquals(expected, mInsetDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth()
367 expected = mPassDrawable.getIntrinsicWidth(); in testGetIntrinsicWidth()
[all …]
DLayerDrawableTest.java309 doReturn(10).when(firstLayer).getIntrinsicWidth(); in testSetLayerInset()
312 doReturn(-1).when(secondLayer).getIntrinsicWidth(); in testSetLayerInset()
324 assertEquals(layerDrawable.getDrawable(0).getIntrinsicWidth() + left + right, in testSetLayerInset()
325 layerDrawable.getIntrinsicWidth()); in testSetLayerInset()
332 assertEquals(layerDrawable.getDrawable(0).getIntrinsicWidth() + left + right, in testSetLayerInset()
333 layerDrawable.getIntrinsicWidth()); in testSetLayerInset()
481 assertEquals(34, layerDrawable.getIntrinsicWidth()); in testAccessPaddingMode()
488 assertEquals(30, layerDrawable.getIntrinsicWidth()); in testAccessPaddingMode()
790 doReturn(10).when(largeMockDrawable).getIntrinsicWidth(); in testGetIntrinsicWidth()
793 doReturn(1).when(smallMockDrawable).getIntrinsicWidth(); in testGetIntrinsicWidth()
[all …]
DGradientDrawableTest.java241 assertEquals(width, gradientDrawable.getIntrinsicWidth()); in verifySetSize()
609 assertEquals(6, gradientDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth()
612 assertEquals(-10, gradientDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth()
642 assertEquals(10, d1.getIntrinsicWidth()); in testMutate()
644 assertEquals(10, d2.getIntrinsicWidth()); in testMutate()
646 assertEquals(10, d3.getIntrinsicWidth()); in testMutate()
651 assertEquals(20, d1.getIntrinsicWidth()); in testMutate()
653 assertEquals(10, d2.getIntrinsicWidth()); in testMutate()
655 assertEquals(10, d3.getIntrinsicWidth()); in testMutate()
659 assertEquals(20, d1.getIntrinsicWidth()); in testMutate()
[all …]
DStateListDrawableTest.java215 final int tempWidth0 = preloadedDrawable.getIntrinsicWidth(); in verifyPreloadDensityTestForDrawableInner()
217 final int tempWidth1 = preloadedDrawable.getIntrinsicWidth(); in verifyPreloadDensityTestForDrawableInner()
239 assertEquals(Math.round(origWidth0 * 0.5f), halfDrawable.getIntrinsicWidth(), 1); in verifyPreloadDensityTestForDrawableInner()
241 assertEquals(Math.round(origWidth1 * 0.5f), halfDrawable.getIntrinsicWidth(), 1); in verifyPreloadDensityTestForDrawableInner()
249 assertEquals(origWidth0 * 2, doubleDrawable.getIntrinsicWidth(), 1); in verifyPreloadDensityTestForDrawableInner()
251 assertEquals(origWidth1 * 2, doubleDrawable.getIntrinsicWidth(), 1); in verifyPreloadDensityTestForDrawableInner()
258 assertEquals(origWidth0, origDrawable.getIntrinsicWidth()); in verifyPreloadDensityTestForDrawableInner()
260 assertEquals(origWidth1, origDrawable.getIntrinsicWidth()); in verifyPreloadDensityTestForDrawableInner()
DNinePatchDrawableTest.java282 assertEquals(bmp.getWidth(), mNinePatchDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth()
283 assertEquals(5, mNinePatchDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth()
287 assertEquals(bmp.getWidth(), mNinePatchDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth()
288 assertEquals(9, mNinePatchDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth()
388 assertEquals(targetWidth, ninePatchDrawable.getIntrinsicWidth()); in testInflate()
401 assertTrue(sourceWidth != ninePatchDrawable.getIntrinsicWidth()); in testInflate()
465 final int origWidth = preloadedDrawable.getIntrinsicWidth(); in verifySetTargetDensityInner()
479 assertEquals(Math.round(origWidth * scale), scaledDrawable.getIntrinsicWidth()); in verifySetTargetDensityInner()
496 assertEquals(origWidth, scaledDrawable.getIntrinsicWidth()); in verifySetTargetDensityInner()
550 final int origWidth = preloadedDrawable.getIntrinsicWidth(); in verifyPreloadDensityInner()
[all …]
DAnimationDrawableTest.java204 assertEquals(drawable.getIntrinsicWidth(), frame.getIntrinsicWidth()); in testGetFrame()
209 assertEquals(drawable.getIntrinsicWidth(), frame.getIntrinsicWidth()); in testGetFrame()
214 assertEquals(drawable.getIntrinsicWidth(), frame.getIntrinsicWidth()); in testGetFrame()
DPictureDrawableTest.java76 assertEquals(-1, pictureDrawable.getIntrinsicWidth()); in testGetIntrinsicSize()
83 assertEquals(99, pictureDrawable.getIntrinsicWidth()); in testGetIntrinsicSize()
DVectorDrawableTest.java445 final int origWidth = preloadedDrawable.getIntrinsicWidth(); in verifyPreloadDensityInner()
454 assertEquals(Math.round(origWidth * approxHalf), halfDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner()
460 assertEquals(origWidth * 2, doubleDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner()
466 assertEquals(origWidth, origDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner()
471 assertEquals(origWidth, halfDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner()
473 assertEquals(origWidth, doubleDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner()
DAnimatedStateListDrawableTest.java196 final int width = cs.getChild(i).getIntrinsicWidth(); in runPreloadDensityTestForDrawableInner()
214 assertEquals(Math.round(origWidth[i] * 0.5f), halfDrawable.getIntrinsicWidth(), 1); in runPreloadDensityTestForDrawableInner()
223 assertEquals(origWidth[i] * 2, doubleDrawable.getIntrinsicWidth(), 1); in runPreloadDensityTestForDrawableInner()
232 assertEquals(origWidth[i], origDrawable.getIntrinsicWidth()); in runPreloadDensityTestForDrawableInner()
DShapeDrawableTest.java130 assertEquals(0, shapeDrawable.getIntrinsicWidth()); in testAccessIntrinsicWidth()
133 assertEquals(10, shapeDrawable.getIntrinsicWidth()); in testAccessIntrinsicWidth()
136 assertEquals(Integer.MIN_VALUE, shapeDrawable.getIntrinsicWidth()); in testAccessIntrinsicWidth()
139 assertEquals(Integer.MAX_VALUE, shapeDrawable.getIntrinsicWidth()); in testAccessIntrinsicWidth()
267 assertEquals(42, shapeDrawable.getIntrinsicWidth()); in testInflate()
DDrawableTest.java397 assertEquals(densityAdjustedSize, drawable.getIntrinsicWidth()); in testImageIntrinsicScaledForDensity()
412 assertEquals(densityAdjustedSize, drawable.getIntrinsicWidth()); in testImageIntrinsicScaledForDensityWithBitmapOptions()
424 assertEquals(expected.getIntrinsicWidth(), drawable.getIntrinsicWidth()); in testCreateFromXml()
437 assertEquals(expected.getIntrinsicWidth(), drawable.getIntrinsicWidth()); in testCreateFromXmlThemed()
452 assertEquals(expected.getIntrinsicWidth(), drawable.getIntrinsicWidth()); in testCreateFromXmlInner()
469 assertEquals(expected.getIntrinsicWidth(), drawable.getIntrinsicWidth()); in testCreateFromXmlInnerThemed()
533 assertEquals(-1, mockDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth()
DAnimatedImageDrawableTest.java152 assertEquals(WIDTH, drawable.getIntrinsicWidth()); in testDecodeAnimatedImageDrawable()
296 Bitmap bm = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), in testLifeCycleSoftware()
473 Bitmap actual = Bitmap.createBitmap(drawable.getIntrinsicWidth(), in testColorFilter()
503 assertEquals(width, exifAnimation.getIntrinsicWidth()); in testExif()
535 Bitmap expected = Bitmap.createBitmap(drawable.getIntrinsicWidth(), in testPostProcess()
542 Rect r = rectCreator.apply(drawable.getIntrinsicWidth(), in testPostProcess()
581 Bitmap actual = Bitmap.createBitmap(drawable.getIntrinsicWidth(), in testPostProcess()
669 Bitmap test = Bitmap.createBitmap(drawable.getIntrinsicWidth(), in drawAndCompare()
681 final int width = drawable.getIntrinsicWidth(); in testAutoMirroredDrawing()
DBitmapDrawableTest.java145 int intrinsicWidth = bitmapDrawable.getIntrinsicWidth(); in testBitmapDrawableOpticalInset()
383 assertEquals(-1, bitmapDrawable.getIntrinsicWidth()); in testGetIntrinsicSize()
389 assertEquals(200, bitmapDrawable.getIntrinsicWidth()); in testGetIntrinsicSize()
395 assertEquals(48, bitmapDrawable.getIntrinsicWidth()); in testGetIntrinsicSize()
420 assertEquals(targetWidth, bitmapDrawable.getIntrinsicWidth()); in testSetTargetDensity()
434 assertEquals(targetWidth, bitmapDrawable.getIntrinsicWidth()); in testSetTargetDensity()
449 assertEquals(targetWidth, bitmapDrawable.getIntrinsicWidth()); in testSetTargetDensity()
DRotateDrawableTest.java265 assertEquals(drawable.getIntrinsicWidth(), mRotateDrawable.getIntrinsicWidth()); in testGetIntrinsicWidthAndHeight()
275 assertEquals(drawable.getIntrinsicWidth(), rotateDrawable.getIntrinsicWidth()); in testGetIntrinsicWidthAndHeight()
DVectorDrawableSizeTest.java72 assertEquals(Math.round(mDpSize * densityDpi / 160f), drawable.getIntrinsicWidth()); in testVectorDrawableSize()
DDrawableContainerStateTest.java207 doReturn(0).when(dr0).getIntrinsicWidth(); in testConstantHeightsAndWidths()
219 doReturn(4).when(dr1).getIntrinsicWidth(); in testConstantHeightsAndWidths()
231 doReturn(5).when(dr2).getIntrinsicWidth(); in testConstantHeightsAndWidths()
/cts/tests/tests/widget/src/android/widget/cts/
DCheckedTextViewTest.java214 assertEquals(firstDrawable.getIntrinsicWidth(), mCheckedTextView.getPaddingRight());
230 assertEquals(secondDrawable.getIntrinsicWidth() + basePaddingRight,
253 assertEquals(firstDrawable.getIntrinsicWidth() + basePaddingRight,
260 assertEquals(firstDrawable.getIntrinsicWidth() + basePaddingRight,
267 assertEquals(secondDrawable.getIntrinsicWidth() + basePaddingRight,
333 checkMark.getIntrinsicWidth(), checkMark.getIntrinsicHeight(), false,
345 checkMark.getIntrinsicWidth(), checkMark.getIntrinsicHeight(), false,
356 checkMark.getIntrinsicWidth(), checkMark.getIntrinsicHeight(), false,
382 checkMark.getIntrinsicWidth(), checkMark.getIntrinsicHeight(), false, in testCheckMarkTintBlendMode()
394 checkMark.getIntrinsicWidth(), checkMark.getIntrinsicHeight(), false, in testCheckMarkTintBlendMode()
[all …]
DImageButtonTest.java82 imageButtonDrawable.getIntrinsicWidth(), imageButtonDrawable.getIntrinsicHeight(), in testImageSource()
88 imageButtonDrawable.getIntrinsicWidth(), imageButtonDrawable.getIntrinsicHeight(), in testImageSource()
94 imageButtonDrawable.getIntrinsicWidth(), imageButtonDrawable.getIntrinsicHeight(), in testImageSource()
DToolbarTest.java219 toolbarOverflowIcon.getIntrinsicWidth(), toolbarOverflowIcon.getIntrinsicHeight(), in testMenuOverflowIcon()
261 toolbarNavigationIcon.getIntrinsicWidth(), in testNavigationConfiguration()
269 toolbarNavigationIcon.getIntrinsicWidth(), in testNavigationConfiguration()
297 toolbarCollapseIcon.getIntrinsicWidth(), in testCollapseConfiguration()
305 toolbarCollapseIcon.getIntrinsicWidth(), in testCollapseConfiguration()
325 toolbarLogo.getIntrinsicWidth(), in testLogoConfiguration()
333 toolbarLogo.getIntrinsicWidth(), in testLogoConfiguration()
DFrameLayoutTest.java105 WidgetTestUtils.assertScaledPixels(48, foreground.getIntrinsicWidth(), mActivity); in testSetForegroundGravity()
107 assertTrue(mFrameLayout.getWidth() > foreground.getIntrinsicWidth()); in testSetForegroundGravity()
124 WidgetTestUtils.assertScaledPixels(48, newForeground.getIntrinsicWidth(), mActivity); in testSetForegroundGravity()
126 assertTrue(mFrameLayout.getWidth() > foreground.getIntrinsicWidth()); in testSetForegroundGravity()
137 assertEquals(foreground.getIntrinsicWidth(), rect2.right - rect2.left); in testSetForegroundGravity()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DBitmapDrawableTest.java92 final int origWidth = preloadedDrawable.getIntrinsicWidth(); in verifyPreloadDensityInner()
108 assertEquals(Math.round(origWidth * scale), scaledDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner()
123 assertEquals(origWidth, scaledDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner()
130 final Rect drBounds = new Rect(0, 0, dr.getIntrinsicWidth(), dr.getIntrinsicHeight()); in runTest()
/cts/tests/tests/transition/src/android/transition/cts/
DChangeImageTransformTest.java136 int imageWidth = mImage.getIntrinsicWidth(); in centerMatrix()
150 int imageWidth = mImage.getIntrinsicWidth(); in fitXYMatrix()
164 int imageWidth = mImage.getIntrinsicWidth(); in centerCropMatrix()
186 int imageWidth = mImage.getIntrinsicWidth(); in fitCenterMatrix()
208 int imageWidth = mImage.getIntrinsicWidth(); in fitStartMatrix()
224 int imageWidth = mImage.getIntrinsicWidth(); in fitEndMatrix()
/cts/hostsidetests/shortcuts/deviceside/common/src/android/content/pm/cts/shortcut/device/common/
DShortcutManagerDeviceTestBase.java116 assertEquals(expected.getIntrinsicWidth(), actual.getIntrinsicWidth()); in assertIconDimensions()
/cts/tests/app/src/android/app/cts/
DLauncherActivity_IconResizerTest.java54 assertTrue(thumbNail.getIntrinsicWidth() > 0); in testIconResizer()
/cts/tests/tests/content/src/android/content/res/cts/
DResourcesTest.java331 assertEquals(212 * targetDensity / defaultDensity, draw.getIntrinsicWidth(), 1); in testGetDrawable()
413 assertEquals(300, ldpi.getIntrinsicWidth()); in testGetDrawableForDensity()
417 assertEquals(200, mdpi.getIntrinsicWidth()); in testGetDrawableForDensity()
421 assertEquals(100, hdpi.getIntrinsicWidth()); in testGetDrawableForDensity()
432 assertEquals(defaultDrawable.getIntrinsicWidth(), densityDrawable.getIntrinsicWidth()); in testGetDrawableForDensityWithZeroDensityIsSameAsGetDrawable()
445 assertEquals(300, ldpi.getIntrinsicWidth()); in testGetDrawableForDensityWithAdaptiveIconDrawable()
450 assertEquals(200, mdpi.getIntrinsicWidth()); in testGetDrawableForDensityWithAdaptiveIconDrawable()
455 assertEquals(100, hdpi.getIntrinsicWidth()); in testGetDrawableForDensityWithAdaptiveIconDrawable()

12