Home
last modified time | relevance | path

Searched refs:colorDrawable (Results 1 – 3 of 3) sorted by relevance

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DColorDrawableTest.java47 ColorDrawable colorDrawable = new ColorDrawable(); in testAccessAlpha() local
48 assertEquals(0, colorDrawable.getAlpha()); in testAccessAlpha()
50 colorDrawable.setAlpha(128); in testAccessAlpha()
51 assertEquals(0, colorDrawable.getAlpha()); in testAccessAlpha()
53 colorDrawable = new ColorDrawable(1 << 24); in testAccessAlpha()
54 assertEquals(1, colorDrawable.getAlpha()); in testAccessAlpha()
56 colorDrawable.setAlpha(128); in testAccessAlpha()
57 assertEquals(0, colorDrawable.getAlpha()); in testAccessAlpha()
59 colorDrawable.setAlpha(255); in testAccessAlpha()
60 assertEquals(1, colorDrawable.getAlpha()); in testAccessAlpha()
[all …]
DLayerDrawableTest.java53 Drawable colorDrawable = new ColorDrawable(Color.BLUE); in testConstructor() local
54 Drawable[] array = new Drawable[] { bitmapDrawable, colorDrawable }; in testConstructor()
58 assertSame(colorDrawable, layerDrawable.getDrawable(1)); in testConstructor()
128 Drawable colorDrawable = new ColorDrawable(Color.BLUE); in testFindDrawableByLayerId() local
129 Drawable[] array = new Drawable[] { bitmapDrawable, colorDrawable }; in testFindDrawableByLayerId()
135 assertSame(colorDrawable, layerDrawable.findDrawableByLayerId(20)); in testFindDrawableByLayerId()
141 assertSame(colorDrawable, layerDrawable.findDrawableByLayerId(Integer.MAX_VALUE)); in testFindDrawableByLayerId()
145 assertSame(colorDrawable, layerDrawable.findDrawableByLayerId(10)); in testFindDrawableByLayerId()
210 Drawable colorDrawable = new ColorDrawable(Color.BLUE); in testAccessDrawable() local
211 Drawable[] array = new Drawable[] { bitmapDrawable, colorDrawable }; in testAccessDrawable()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DViewTest.java640 ColorDrawable colorDrawable; in testSetBackgroundColor() local
644 colorDrawable = (ColorDrawable) view.getBackground(); in testSetBackgroundColor()
645 assertNotNull(colorDrawable); in testSetBackgroundColor()
646 assertEquals(0xFF, colorDrawable.getAlpha()); in testSetBackgroundColor()
649 colorDrawable = (ColorDrawable) view.getBackground(); in testSetBackgroundColor()
650 assertNotNull(colorDrawable); in testSetBackgroundColor()
651 assertEquals(0, colorDrawable.getAlpha()); in testSetBackgroundColor()