Home
last modified time | relevance | path

Searched refs:dr (Results 1 – 25 of 97) sorted by relevance

1234

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DDrawableContainerTest.java106 Drawable dr = spy(new ColorDrawable(Color.WHITE)); in testDraw() local
107 addAndSelectDrawable(dr); in testDraw()
109 reset(dr); in testDraw()
110 doNothing().when(dr).draw(any()); in testDraw()
112 verify(dr, times(1)).draw(any()); in testDraw()
114 reset(dr); in testDraw()
115 doNothing().when(dr).draw(any()); in testDraw()
117 verify(dr, times(1)).draw(any()); in testDraw()
251 Drawable dr = spy(new ColorDrawable(Color.BLUE)); in testSetDither() local
252 addAndSelectDrawable(dr); in testSetDither()
[all …]
DAnimationDrawableTest.java282 AnimationDrawable dr = new AnimationDrawable(); in testInflateCorrect() local
283 dr.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateCorrect()
285 assertFalse(dr.isVisible()); in testInflateCorrect()
287 assertTrue(dr.isOneShot()); in testInflateCorrect()
290 (DrawableContainerState) dr.getConstantState(); in testInflateCorrect()
292 assertEquals(2, dr.getNumberOfFrames()); in testInflateCorrect()
293 assertEquals(2000, dr.getDuration(0)); in testInflateCorrect()
294 assertEquals(1000, dr.getDuration(1)); in testInflateCorrect()
295 assertSame(dr.getFrame(0), dr.getCurrent()); in testInflateCorrect()
301 AnimationDrawable dr = new AnimationDrawable(); in testInflateMissingDrawable() local
[all …]
DCustomAnimationScaleListDrawableTest.java67 Drawable dr = mContext.getDrawable(DRAWABLE_ID); in testNonZeroDurationScale() local
68 assertTrue(dr instanceof DrawableContainer); in testNonZeroDurationScale()
69 assertTrue(dr.getCurrent() instanceof Animatable); in testNonZeroDurationScale()
77 Drawable dr = mContext.getDrawable(DRAWABLE_ID); in testZeroDurationScale() local
78 assertTrue(dr instanceof DrawableContainer); in testZeroDurationScale()
79 assertFalse(dr.getCurrent() instanceof Animatable); in testZeroDurationScale()
DRippleDrawableTest.java130 RippleDrawable dr = new RippleDrawable(ColorStateList.valueOf(Color.RED), null, null); in testSetColor() local
131 dr.setCallback(cb); in testSetColor()
133 dr.setColor(ColorStateList.valueOf(Color.BLACK)); in testSetColor()
134 verify(cb, times(1)).invalidateDrawable(dr); in testSetColor()
DCustomDrawableTest.java49 Drawable dr = InstrumentationRegistry.getTargetContext().getDrawable( in testInflation() local
51 assertTrue(dr instanceof CustomDrawable); in testInflation()
52 assertEquals(Color.RED, ((CustomDrawable) dr).getColor()); in testInflation()
DNinePatchDrawableTest.java440 void setTargetDensity(NinePatchDrawable dr, int density); in setTargetDensity() argument
505 verifySetTargetDensityOuter((dr, density) -> dr.setTargetDensity(density)); in testSetTargetDensity()
512 verifySetTargetDensityOuter((dr, density) -> { in testSetTargetDensity_Canvas() argument
515 dr.setTargetDensity(c); in testSetTargetDensity_Canvas()
523 verifySetTargetDensityOuter((dr, density) -> { in testSetTargetDensity_DisplayMetrics() argument
526 dr.setTargetDensity(dm); in testSetTargetDensity_DisplayMetrics()
677 private void compareOrSave(Drawable dr, int densityDpi, int sourceResId, int goldenResId) { in compareOrSave() argument
678 final int width = dr.getIntrinsicWidth(); in compareOrSave()
679 final int height = dr.getIntrinsicHeight(); in compareOrSave()
684 dr.setBounds(0, 0, width, height); in compareOrSave()
[all …]
DLayerDrawableTest.java1493 LayerDrawable dr; in testChildIntrinsicSize() local
1496 dr = (LayerDrawable) mContext.getDrawable(R.drawable.layer_drawable_intrinsic); in testChildIntrinsicSize()
1497 assertEquals(-1, dr.getIntrinsicWidth()); in testChildIntrinsicSize()
1498 assertEquals(-1, dr.getIntrinsicHeight()); in testChildIntrinsicSize()
1501 dr = new LayerDrawable(new Drawable[] { new ColorDrawable(Color.RED) }); in testChildIntrinsicSize()
1502 dr.setLayerInset(0, 10, 10, 10, 10); in testChildIntrinsicSize()
1503 assertEquals(-1, dr.getIntrinsicWidth()); in testChildIntrinsicSize()
1504 assertEquals(-1, dr.getIntrinsicHeight()); in testChildIntrinsicSize()
1507 dr = (LayerDrawable) mContext.getDrawable(R.drawable.layer_drawable_intrinsic_mixed); in testChildIntrinsicSize()
1508 int width = dr.getLayerInsetLeft(0) + dr.getLayerInsetRight(0) in testChildIntrinsicSize()
[all …]
DScaleDrawableTest.java303 ScaleDrawable dr = new ScaleDrawable(null, Gravity.CENTER, 1, 1); in testInitialLevel() local
309 dr.inflate(res, parser, attrs); in testInitialLevel()
310 assertEquals(5000, dr.getLevel()); in testInitialLevel()
312 dr.setLevel(0); in testInitialLevel()
313 assertEquals(0, dr.getLevel()); in testInitialLevel()
316 ScaleDrawable clone = (ScaleDrawable) dr.getConstantState().newDrawable(res); in testInitialLevel()
320 dr.setLevel(1000); in testInitialLevel()
321 assertEquals(1000, dr.getLevel()); in testInitialLevel()
DDrawableContainerStateTest.java278 DrawableContainer dr = new LevelListDrawable(); in testCanConstantState() local
279 DrawableContainerState cs = (DrawableContainerState) dr.getConstantState(); in testCanConstantState()
290 DrawableContainer dr = new LevelListDrawable(); in testGrowArray() local
291 DrawableContainerState cs = (DrawableContainerState) dr.getConstantState(); in testGrowArray()
DAdaptiveIconDrawableTest.java62 AdaptiveIconDrawable dr = new AdaptiveIconDrawable(null, null); in testInflate() local
69 dr.inflate(r, parser, attrs); in testInflate()
74 AdaptiveIconDrawable dr = new AdaptiveIconDrawable(null, null); in testInflateNull() local
75 dr.inflate(null, null, null); in testInflateNull()
81 AdaptiveIconDrawable dr = new AdaptiveIconDrawable(null, null); in testDraw() local
82 dr.draw(c); in testDraw()
DClipDrawableTest.java164 Drawable dr = spy(new ColorDrawable(Color.GREEN)); in testGetOpacity() local
165 doReturn(PixelFormat.OPAQUE).when(dr).getOpacity(); in testGetOpacity()
167 ClipDrawable clipDrawable = new ClipDrawable(dr, Gravity.BOTTOM, ClipDrawable.HORIZONTAL); in testGetOpacity()
178 doReturn(PixelFormat.TRANSLUCENT).when(dr).getOpacity(); in testGetOpacity()
179 clipDrawable = new ClipDrawable(dr, Gravity.BOTTOM, ClipDrawable.HORIZONTAL); in testGetOpacity()
DDrawableWrapperTest.java64 public MyWrapper(Drawable dr) { in MyWrapper() argument
65 super(dr); in MyWrapper()
160 Drawable dr = new MockDrawable(); in testCallbackIsSet() local
162 DrawableWrapper wrapper = new MyWrapper(dr); in testCallbackIsSet()
163 assertEquals(wrapper, dr.getCallback()); in testCallbackIsSet()
DAnimatedImageDrawableTest.java504 Drawable dr = ImageDecoder.decodeDrawable(source, (decoder, info, src) -> { in testPostProcess() local
511 assertTrue(dr instanceof AnimatedImageDrawable); in testPostProcess()
512 testDrawable = (AnimatedImageDrawable) dr; in testPostProcess()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DBitmapDrawableTest.java129 private void runTest(Drawable dr) { in runTest() argument
130 final Rect drBounds = new Rect(0, 0, dr.getIntrinsicWidth(), dr.getIntrinsicHeight()); in runTest()
134 dr.setBounds(drBounds); in runTest()
135 dr.draw(canvas); in runTest()
/cts/hostsidetests/theme/src/android/theme/cts/
DComparisonTask.java101 final int dr = getAlphaScaledRed(p1) - getAlphaScaledRed(p2); in checkNeighbors() local
107 Math.abs(dr) <= threshold) { in checkNeighbors()
144 final int dr = getAlphaScaledRed(p1) - getAlphaScaledRed(p2); in compare() local
150 Math.abs(dr) > threshold) { in compare()
151 System.err.println("fail dr=" + dr+ " dg=" + dg+ " db=" + db); in compare()
/cts/tests/tests/graphics/src/android/graphics/cts/
DImageDecoderTest.java558 Drawable dr = Drawable.createFromResourceStream(mRes, value, is, null, null); in testNinepatchWithDensityNone() local
559 assertNotNull(dr); in testNinepatchWithDensityNone()
560 assertEquals(5, dr.getIntrinsicWidth()); in testNinepatchWithDensityNone()
561 assertEquals(5, dr.getIntrinsicHeight()); in testNinepatchWithDensityNone()
757 Drawable dr = ImageDecoder.decodeDrawable(src, (decoder, info, s) -> { in testSampleSize() local
761 checkSampleSize(name, record.width, sampleSize, dr.getIntrinsicWidth()); in testSampleSize()
762 checkSampleSize(name, record.height, sampleSize, dr.getIntrinsicHeight()); in testSampleSize()
783 Drawable dr = ImageDecoder.decodeDrawable(src, (decoder, info, s) -> { in testLargeSampleSize() local
787 assertEquals(1, dr.getIntrinsicWidth()); in testLargeSampleSize()
799 Drawable dr = null; in testResizeTransparency() local
[all …]
/cts/tests/tests/content/src/android/content/res/cts/
DResources_ThemeTest.java160 final ColorDrawable dr = (ColorDrawable) theme.getDrawable(R.drawable.colordrawable_themed); in testGetDrawable() local
161 assertEquals(Color.BLACK, dr.getColor()); in testGetDrawable()
/cts/tests/tests/widget/src/android/widget/cts/
DImageViewTest.java842 protected boolean verifyDrawable(Drawable dr) { in verifyDrawable() argument
843 return super.verifyDrawable(dr); in verifyDrawable()
/cts/tests/tests/media/assets/hls_variant/165340/
D11.ts199 0�(�n7G������CM��$���`����&v�-�w�b �\b����O�)�dr� ZL6� gﱓ�����Xc��CY V|t[(�����2�…
210 �Ѭ�G7a��:Cc��E.�Z���`*3 ���#���&m��7��P��[�)&��� �Dy��8���̣-������dr�����-`�{�x(���G�Ls…
D06.ts414 …���x_�T�V� ��-O�8`���!�O�@�/ �CaP��� +� �L������BujCo���֋+]^ɲ�.��x��dr���&qu��!L[t6[���…
703 =�:��{�����d����dr!nbr a�fOF�R�n�K����D��"�=#���_����G�6�������������������������������T{QY1�…
D12.ts559 …�E�"�+�+��oח�T�3QG�}1�&�����-�����S|��78�?��ySJ�\���˟[�+�T� dr�j7�� �Ub׷],I%����{#…
D18.ts466 ����n9?��oM�������?��p��|l��.$��G��pr#�drٜ�D07$�V�m�U��d���+%L�o�����ⲯ�H��&�$��ݶ�…
D14.ts194 r,��dr�ܧ�Q'�J�5����hm�� 'H��b����!�sqDV��i�vS 
D15.ts141 …�YZ� [���B"���rvG��=��Ś�Y�+?X��>!�¿������#�o�$��`�E@l�B�V$�zZज़Pjeߔ�GC�a\:dr��)�< P�X����v
/cts/tests/tests/media/assets/hls_variant/387360/
D18.ts255 dr�5�XVб�Qz�����

1234