Home
last modified time | relevance | path

Searched refs:getColor (Results 1 – 25 of 52) sorted by relevance

123

/cts/tests/tests/graphics/src/android/graphics/cts/
DLinearGradientTest.java97 convert.apply(blue), b.getColor(0, 0), 0.09f);
100 convert.apply(green), b.getColor(0, 20), 0.09f);
103 convert.apply(red), b.getColor(0, 39), 0.08f);
106 b.getColor(10, 10), b.getColor(20, 10), 0f);
108 assertTrue(b.getColor(10, 0).blue() > b.getColor(10, 5).blue());
109 assertTrue(b.getColor(10, 5).blue() > b.getColor(10, 10).blue());
110 assertTrue(b.getColor(10, 0).green() < b.getColor(10, 5).green());
111 assertTrue(b.getColor(10, 5).green() < b.getColor(10, 10).green());
113 assertTrue(b.getColor(10, 20).green() > b.getColor(10, 30).green());
114 assertTrue(b.getColor(10, 30).green() > b.getColor(10, 35).green());
[all …]
DRadialGradientTest.java88 final Color centerColor = bitmap.getColor(50, 50); in testColorLong()
96 bitmap.getColor(p.x, p.y), .001f); in testColorLong()
114 Color c = bitmap.getColor(x, y); in testColorLong()
DPaintTest.java96 assertEquals(Color.BLUE, result.getColor()); in testDefaultColor()
107 assertEquals(Color.GREEN, result.getColor()); in testDefaultColor()
119 assertEquals(Color.BLACK, p.getColor()); in testDefaultColor()
535 assertEquals(0, p.getColor()); in testSetARGB()
538 assertEquals((3 << 24) | (3 << 16) | (3 << 8) | 3, p.getColor()); in testSetARGB()
855 assertEquals(1, p.getColor());
858 assertEquals(0, p.getColor());
861 assertEquals(255, p.getColor());
864 assertEquals(-1, p.getColor());
867 assertEquals(256, p.getColor());
[all …]
/cts/tests/tests/view/surfacevalidator/src/android/view/cts/surfacevalidator/
DPixelChecker.java38 PixelColor getColor() { in getColor() method in PixelChecker
48 final short maxAlpha = getColor().mMaxAlpha; in validatePlane()
49 final short minAlpha = getColor().mMinAlpha; in validatePlane()
50 final short maxRed = getColor().mMaxRed; in validatePlane()
51 final short minRed = getColor().mMinRed; in validatePlane()
52 final short maxGreen = getColor().mMaxGreen; in validatePlane()
53 final short minGreen = getColor().mMinGreen; in validatePlane()
54 final short maxBlue = getColor().mMaxBlue; in validatePlane()
55 final short minBlue = getColor().mMinBlue; in validatePlane()
/cts/tests/tests/hardware/src/android/hardware/lights/cts/
DLightsManagerTest.java97 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(RED); in testControlSingleLight()
113 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(0xffaaaaff); in testControlMultipleLights()
114 assertThat(mManager.getLightState(mLights.get(1)).getColor()).isEqualTo(0xffbbbbff); in testControlMultipleLights()
118 assertThat(mManager.getLightState(mLights.get(i)).getColor()).isEqualTo(0x00); in testControlMultipleLights()
128 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(0x00); in testControlLights_onlyEffectiveForLifetimeOfClient()
134 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(TAN); in testControlLights_onlyEffectiveForLifetimeOfClient()
139 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(0x00); in testControlLights_onlyEffectiveForLifetimeOfClient()
154 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(TAN); in testControlLights_firstCallerWinsContention()
159 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(RED); in testControlLights_firstCallerWinsContention()
164 assertThat(mManager.getLightState(mLights.get(0)).getColor()).isEqualTo(0); in testControlLights_firstCallerWinsContention()
[all …]
/cts/tests/tests/text/src/android/text/style/cts/
DQuoteSpanTest.java42 assertTrue(span.getColor() != 0); in testDefaultConstructor()
52 assertEquals(Color.RED, span.getColor()); in testConstructorFromColor()
61 assertEquals(Color.RED, span.getColor()); in testConstructorFromColorStripeWidthGapWidth()
76 assertEquals(Color.RED, span.getColor()); in testConstructorFromParcel()
95 assertEquals(Color.BLACK, quoteSpan.getColor()); in testGetColor()
98 assertEquals(Color.BLUE, quoteSpan.getColor()); in testGetColor()
137 assertEquals(Color.RED, q.getColor()); in testWriteToParcel()
149 assertEquals(Color.MAGENTA, q.getColor()); in testWriteToParcel()
DBulletSpanTest.java45 assertEquals(0, bulletSpan.getColor()); in testDefaultConstructor()
55 assertEquals(0, bulletSpan.getColor()); in testConstructorFromGapWidth()
65 assertEquals(Color.RED, bulletSpan.getColor()); in testConstructorFromGapWidthColor()
74 assertEquals(Color.RED, bulletSpan.getColor()); in testConstructorFromGapWidthColorBulletRadius()
143 assertEquals(Color.RED, b.getColor()); in testWriteToParcel()
158 assertEquals(0, bulletSpan.getColor()); in testWriteToParcel()
DForegroundColorSpanTest.java64 assertEquals(0, tp.getColor()); in testUpdateDrawState()
66 assertEquals(Color.CYAN, tp.getColor()); in testUpdateDrawState()
70 assertEquals(Color.DKGRAY, tp.getColor()); in testUpdateDrawState()
DClickableSpanTest.java47 assertEquals(Color.RED, tp.getColor()); in testUpdateDrawState()
52 assertEquals(Color.BLUE, tp.getColor()); in testUpdateDrawState()
DDynamicDrawableSpanTest.java113 assertThat(bitmap.getColor(0, i).toArgb()).isEqualTo(Color.RED); in testCenterAligned()
117 assertThat(bitmap.getColor(0, i + padding / 2).toArgb()).isNotEqualTo(Color.RED); in testCenterAligned()
121 assertThat(bitmap.getColor(0, i + DRAWABLE_SIZE + padding / 2).toArgb()) in testCenterAligned()
DLineBackgroundSpan_StandardTest.java43 assertEquals(COLOR, span.getColor()); in testGetColor()
55 assertEquals(COLOR, parcelSpan.getColor()); in testWriteToParcel()
/cts/tests/tests/view/src/android/view/cts/
DContextThemeWrapperTest.java166 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColor, defValue), in verifyIdenticalTextAppearanceStyle()
167 ta.getColor(R.styleable.TextAppearance_textColor, defValue)); in verifyIdenticalTextAppearanceStyle()
168 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColorHint, defValue), in verifyIdenticalTextAppearanceStyle()
169 ta.getColor(R.styleable.TextAppearance_textColorHint, defValue)); in verifyIdenticalTextAppearanceStyle()
170 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColorLink, defValue), in verifyIdenticalTextAppearanceStyle()
171 ta.getColor(R.styleable.TextAppearance_textColorLink, defValue)); in verifyIdenticalTextAppearanceStyle()
172 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColorHighlight, defValue), in verifyIdenticalTextAppearanceStyle()
173 ta.getColor(R.styleable.TextAppearance_textColorHighlight, defValue)); in verifyIdenticalTextAppearanceStyle()
/cts/tests/tests/systemui/src/android/systemui/cts/
DLightBarThemeTest.java72 assertEquals(getInstrumentation().getContext().getColor(R.color.navigationBarDividerColor), in testGetNavigationBarDividerColor()
88 instrumentationContext.getColor(R.color.navigationBarDividerColor), in testNavigationBarDividerColor()
89 instrumentationContext.getColor(R.color.navigationBarColor), in testNavigationBarDividerColor()
/cts/tests/tests/widget/src/android/widget/cts/
DCalendarViewTest.java305 assertEquals(mActivity.getColor(R.color.calendarview_week_background), in testAppearanceHolo()
307 assertEquals(mActivity.getColor(R.color.calendarview_focusedmonthdate), in testAppearanceHolo()
309 assertEquals(mActivity.getColor(R.color.calendarview_unfocusedmonthdate), in testAppearanceHolo()
316 mActivity.getColor(R.color.calendarview_week_background_new); in testAppearanceHolo()
318 mActivity.getColor(R.color.calendarview_focusedmonthdate_new); in testAppearanceHolo()
320 mActivity.getColor(R.color.calendarview_unfocusedmonthdate_new); in testAppearanceHolo()
322 mActivity.getColor(R.color.calendarview_week_number_new); in testAppearanceHolo()
324 mActivity.getColor(R.color.calendarview_week_separatorline_new); in testAppearanceHolo()
/cts/tests/app/src/android/app/cts/
DNotificationCarExtenderTest.java43 assertEquals(Notification.COLOR_DEFAULT, extender.getColor()); in testCarExtender_EmptyConstructor()
52 assertEquals(Notification.COLOR_DEFAULT, extender.getColor()); in testCarExtender_Constructor()
71 assertEquals(testColor, extender.getColor()); in testCarExtender()
98 assertEquals(testColor, receiveCarExtender.getColor()); in testCarExtender_extend()
DDialogTest.java174 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColor, defValue), in assertTextAppearanceStyle()
175 ta.getColor(R.styleable.TextAppearance_textColor, defValue)); in assertTextAppearanceStyle()
176 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColorHint, defValue), in assertTextAppearanceStyle()
177 ta.getColor(R.styleable.TextAppearance_textColorHint, defValue)); in assertTextAppearanceStyle()
178 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColorLink, defValue), in assertTextAppearanceStyle()
179 ta.getColor(R.styleable.TextAppearance_textColorLink, defValue)); in assertTextAppearanceStyle()
180 assertEquals(expectedTa.getColor(R.styleable.TextAppearance_textColorHighlight, defValue), in assertTextAppearanceStyle()
181 ta.getColor(R.styleable.TextAppearance_textColorHighlight, defValue)); in assertTextAppearanceStyle()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DCustomDrawableTest.java52 assertEquals(Color.RED, ((CustomDrawable) dr).getColor()); in testInflation()
72 mColor = ta.getColor(0, Color.BLACK); in inflate()
75 public int getColor() { in getColor() method in CustomDrawableTest.CustomDrawable
DColorStateListDrawableTest.java67 new ColorDrawable().getColor()); in testDefaultConstructor()
148 colorDrawable.getColor(), in testColorStateListAccess()
160 assertEquals(colorDrawable.getColor(), mColorStateList.getDefaultColor()); in testSetState()
162 assertEquals(colorDrawable.getColor(), Color.BLUE); in testSetState()
164 assertEquals(colorDrawable.getColor(), Color.RED); in testSetState()
DGradientDrawableTest.java342 gradientDrawable.getColor().getDefaultColor()); in testSetColor()
347 gradientDrawable.getColor().getDefaultColor()); in testSetColor()
373 assertEquals("Color was set to RED", color, gradientDrawable.getColor()); in testSetColorList()
377 ColorStateList.valueOf(Color.TRANSPARENT), gradientDrawable.getColor()); in testSetColorList()
710 assertEquals(context.getColor(R.color.colorPrimary), colors[1]); in testInflationWithThemeAndNonThemeResources()
711 assertEquals(context.getColor(R.color.colorPrimaryDark), colors[2]); in testInflationWithThemeAndNonThemeResources()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DEdgeEffectTests.java108 assertEquals(Color.RED, edgeEffect.getColor()); in assertEdgeEffect()
112 EdgeEffectValidator verifier = new EdgeEffectValidator(edgeEffect.getColor()); in assertEdgeEffect()
137 assertEquals(Color.GREEN, edgeEffect.getColor()); in testSetColor()
188 assertEquals(Color.GREEN, effect.getColor()); in testGetColor()
DBitmapTests.java76 public int getColor() { in getColor() method in BitmapTests.BitmapView
201 if (child.getColor() == Color.BLUE) { in testChangeDuringUiAnimation()
/cts/tests/leanbackjank/app/src/android/leanbackjank/app/presenter/
DCardPresenter.java45 sDefaultBackgroundColor = parent.getResources().getColor(R.color.default_background, null); in onCreateViewHolder()
47 parent.getResources().getColor(R.color.selected_background, null); in onCreateViewHolder()
/cts/tests/leanbackjank/app/src/android/leanbackjank/app/ui/
DMainFragment.java149 setBrandColor(getResources().getColor(R.color.fastlane_background, theme));
151 setSearchAffordanceColor(getResources().getColor(R.color.search_opaque, theme));
/cts/tests/tests/animation/src/android/animation/cts/
DShapeHolder.java68 public int getColor() { in getColor() method in ShapeHolder
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/sixdof/Fragments/
DRobustnessFragment.java155 mTvPassColour.setBackgroundColor(getResources().getColor(R.color.green)); in setupUILoop()
157 mTvPassColour.setBackgroundColor(getResources().getColor(R.color.red)); in setupUILoop()

123