Home
last modified time | relevance | path

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

12345678910>>...12

/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/impl/
DResourceHelperTest.java34 assertNumberFormatException(() -> ResourceHelper.getColor("")); in testGetColor()
35 assertNumberFormatException(() -> ResourceHelper.getColor("AFAFAF")); in testGetColor()
36 assertNumberFormatException(() -> ResourceHelper.getColor("AAA")); in testGetColor()
37 assertNumberFormatException(() -> ResourceHelper.getColor("#JFAFAF")); in testGetColor()
38 assertNumberFormatException(() -> ResourceHelper.getColor("#AABBCCDDEE")); in testGetColor()
39 assertNumberFormatException(() -> ResourceHelper.getColor("#JAAA")); in testGetColor()
40 assertNumberFormatException(() -> ResourceHelper.getColor("#AA BBCC")); in testGetColor()
42 assertEquals(0xffaaaaaa, ResourceHelper.getColor("#AAA")); in testGetColor()
43 assertEquals(0xffaaaaaa, ResourceHelper.getColor(" #AAA")); in testGetColor()
44 assertEquals(0xffaaaaaa, ResourceHelper.getColor("#AAA ")); in testGetColor()
[all …]
/frameworks/base/core/tests/coretests/src/android/graphics/
DColorStateListTest.java40 mFailureColor = mResources.getColor(R.color.failColor); in setUp()
48 assertEquals(mResources.getColor(R.color.testcolor1), focusColor); in testStateIsInList()
56 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testEmptyState()
61 int defaultColor = mResources.getColor(R.color.color1); in testGetColor()
62 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testGetColor()
67 int defaultColor = mResources.getColor(R.color.color_no_default); in testGetColorWhenListHasNoDefault()
68 assertEquals(mResources.getColor(R.color.testcolor1), defaultColor); in testGetColorWhenListHasNoDefault()
/frameworks/base/libs/hwui/tests/unit/
DSkiaPipelineTests.cpp58 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_SKIA_PIPELINE_TEST()
61 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorRED); in RENDERTHREAD_SKIA_PIPELINE_TEST()
80 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_SKIA_PIPELINE_TEST()
83 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_SKIA_PIPELINE_TEST()
84 ASSERT_EQ(TestUtils::getColor(surface, 0, 1), SK_ColorGREEN); in RENDERTHREAD_SKIA_PIPELINE_TEST()
87 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), (unsigned int)SK_ColorTRANSPARENT); in RENDERTHREAD_SKIA_PIPELINE_TEST()
88 ASSERT_EQ(TestUtils::getColor(surface, 0, 1), SK_ColorGREEN); in RENDERTHREAD_SKIA_PIPELINE_TEST()
104 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_SKIA_PIPELINE_TEST()
107 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_SKIA_PIPELINE_TEST()
108 ASSERT_EQ(TestUtils::getColor(surface, 1, 0), SK_ColorBLUE); in RENDERTHREAD_SKIA_PIPELINE_TEST()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/lights/
DLightsServiceTest.java116 assertThat(manager.getLightState(manager.getLights().get(0)).getColor()).isEqualTo(0xf1); in testControlMultipleLights()
117 assertThat(manager.getLightState(manager.getLights().get(1)).getColor()).isEqualTo(0xf2); in testControlMultipleLights()
118 assertThat(manager.getLightState(manager.getLights().get(2)).getColor()).isEqualTo(0xf3); in testControlMultipleLights()
121 assertThat(manager.getLightState(manager.getLights().get(3)).getColor()).isEqualTo(0x00); in testControlMultipleLights()
131 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(TRANSPARENT); in testControlLights_onlyEffectiveForLifetimeOfClient()
137 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(GREEN); in testControlLights_onlyEffectiveForLifetimeOfClient()
142 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(TRANSPARENT); in testControlLights_onlyEffectiveForLifetimeOfClient()
158 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(BLUE); in testControlLights_firstCallerWinsContention()
163 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(WHITE); in testControlLights_firstCallerWinsContention()
168 assertThat(manager.getLightState(micLight).getColor()).isEqualTo(0); in testControlLights_firstCallerWinsContention()
[all …]
/frameworks/base/packages/CarSystemUI/src/com/android/systemui/car/hvac/
DTemperatureColorStore.java39 int getColor() { in getColor() method in TemperatureColorStore.TemperatureColorValue
95 return bottomValue.getColor(); in getColorForTemperature()
100 return topValue.getColor(); in getColorForTemperature()
105 return sTemperatureColorValues[index].getColor(); in getColorForTemperature()
114 return lerpColor(fraction, startValue.getColor(), endValue.getColor()); in getColorForTemperature()
/frameworks/base/core/java/android/transition/
DRecolor.java82 if (startColor.getColor() != endColor.getColor()) { in createAnimator()
83 endColor.setColor(startColor.getColor()); in createAnimator()
85 return ObjectAnimator.ofArgb(endBackground, "color", startColor.getColor(), in createAnimator()
86 endColor.getColor()); in createAnimator()
/frameworks/base/tests/testables/tests/src/android/testing/
DTestableResourcesTest.java54 mContext.getColor(nonExistentId); in testAddingResource()
60 assertEquals(0xffffff, mContext.getColor(nonExistentId)); in testAddingResource()
68 assertEquals(0xffffff, mContext.getColor(nonExistentId)); in testClearingResource()
71 mContext.getColor(nonExistentId); in testClearingResource()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/
DTileColorPickerTest.java50 final int color = mTileColorPicker.getColor(Tile.STATE_UNAVAILABLE); in testGetColor_StateUnavailable_ReturnUnavailableColor()
59 final int color = mTileColorPicker.getColor(Tile.STATE_INACTIVE); in testGetColor_StateInactive_ReturnInactiveColor()
68 final int color = mTileColorPicker.getColor(Tile.STATE_ACTIVE); in testGetColor_StateActive_ReturnActiveColor()
/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/
DPaintActivity.java144 painting.setPaperColor(getColor(R.color.paper_color)); in setupViews()
145 painting.setPaintColor(getColor(R.color.paint_color)); in setupViews()
214 widthButtonDrawable.setFrameColor(getColor(R.color.toolbar_icon_color)); in setupViews()
216 colorButtonDrawable.setFrameColor(getColor(R.color.toolbar_icon_color)); in setupViews()
231 icon.setFrameColor(getColor(R.color.toolbar_icon_color)); in refreshBrushAndColor()
237 icon.setWellColor(getColor(R.color.toolbar_icon_color)); in refreshBrushAndColor()
262 icon.setFrameColor(getColor(R.color.toolbar_icon_color)); in refreshBrushAndColor()
/frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/
DBubbleOverflowActivity.java156 ? res.getColor(R.color.bubbles_dark) in updateTheme()
157 : res.getColor(R.color.bubbles_light)); in updateTheme()
162 int bgColor = typedArray.getColor(0, isNightMode ? Color.BLACK : Color.WHITE); in updateTheme()
163 int textColor = typedArray.getColor(1, isNightMode ? Color.WHITE : Color.BLACK); in updateTheme()
255 final int bgColor = ta.getColor(0, Color.WHITE); in onCreateViewHolder()
256 int textColor = ta.getColor(1, Color.BLACK); in onCreateViewHolder()
DBubbleOverflow.java96 int colorAccent = mContext.getColor(typedValue.resourceId); in updateIcon()
101 ColorDrawable bg = new ColorDrawable(res.getColor(R.color.bubbles_light)); in updateIcon()
104 bg = new ColorDrawable(res.getColor(R.color.bubbles_dark)); in updateIcon()
DBubbleManageEducationView.java69 final int bgColor = ta.getColor(0, Color.BLACK); in onFinishInflate()
70 int textColor = ta.getColor(1, Color.WHITE); in onFinishInflate()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DBarTransitions.java185 mOpaque = context.getColor(R.color.system_bar_background_opaque); in BarBackgroundDrawable()
186 mSemiTransparent = context.getColor( in BarBackgroundDrawable()
188 mTransparent = context.getColor(R.color.system_bar_background_transparent); in BarBackgroundDrawable()
212 if (mTintFilter == null || mTintFilter.getColor() != color) { in setTint()
220 int targetColor = mTintFilter == null ? 0 : mTintFilter.getColor(); in setTintMode()
/frameworks/base/core/java/android/content/res/
DCompatResources.java56 public int getColor(@ColorRes int id) throws NotFoundException { in getColor() method in CompatResources
57 return getColor(id, getTheme()); in getColor()
/frameworks/base/packages/SystemUI/src/com/android/systemui/assist/ui/
DEdgeLight.java58 mColor = sourceLight.getColor(); in EdgeLight()
65 public int getColor() { in getColor() method in EdgeLight
/frameworks/base/core/tests/coretests/src/com/android/internal/policy/
DPhoneWindowTest.java115 assertThat(colorDrawable.getColor(), is(Color.GREEN)); in testWindowBackground_colorLiteral()
129 assertThat(colorDrawable.getColor(), is(Color.BLUE)); in testWindowBackgroundFallback_colorLiteral()
147 assertThat(colorDrawable.getColor(), is(Color.BLUE)); in testWindowBackgroundFallbackWithExplicitBackgroundSet_colorLiteral()
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/util/
DFallbackThemeWrapperTest.java49 assertEquals(0xffff0000, a.getColor(0, 0)); in testThemeValueOnlyInBase()
57 assertEquals(0xff0000ff, a.getColor(0, 0)); in testThemeValueOnlyInFallback()
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/
DScreenshotNotificationsController.java162 .setColor(mResources.getColor( in showSavingScreenshotNotification()
171 .setColor(mResources.getColor( in showSavingScreenshotNotification()
212 .setColor(mContext.getColor( in showScreenshotActionsNotification()
221 .setColor(mContext.getColor( in showScreenshotActionsNotification()
247 .setColor(mContext.getColor( in notifyScreenshotError()
/frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/
DAdaptiveOutlineDrawable.java87 mOutlinePaint.setColor(getColor(resources, type)); in init()
96 private @ColorInt int getColor(Resources resources, @AdaptiveOutlineIconType int type) { in getColor() method in AdaptiveOutlineDrawable
107 return resources.getColor(resId, /* theme */ null); in getColor()
/frameworks/base/core/java/android/text/style/
DLineBackgroundSpan.java118 public final int getColor() { in getColor() method in LineBackgroundSpan.Standard
128 final int originColor = paint.getColor(); in drawBackground()
DQuoteSpan.java163 public int getColor() { in getColor() method in QuoteSpan
196 int color = p.getColor(); in drawLeadingMargin()
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/util/
DPartnerTest.java105 final int color = Partner.getColor(application, R.color.suw_color_accent_dark); in getColor_partnerValuePresent_shouldReturnPartnerValue()
124 int partnerValue = entry.resources.getColor(entry.id); in getResourceEntry_partnerValueNotPresent_shouldReturnDefault()
134 int partnerValue = entry.resources.getColor(entry.id); in getResourceEntry_directBootUnawareNoValueDefined_shouldReturnDefaultValue()
/frameworks/base/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/
DMainActivity.java54 defaultColor = getColor(R.color.none_received); in onCreate()
55 startJobColor = getColor(R.color.start_received); in onCreate()
56 stopJobColor = getColor(R.color.stop_received); in onCreate()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/graph/
DSignalDrawable.java101 mTransparentPaint.setColor(context.getColor(android.R.color.transparent)); in SignalDrawable()
141 setTintList(ColorStateList.valueOf(mForegroundPaint.getColor())); in onLevelChange()
163 int colorForeground = mForegroundPaint.getColor(); in setTintList()
165 if (colorForeground != mForegroundPaint.getColor()) invalidateSelf(); in setTintList()
/frameworks/base/packages/SystemUI/src/com/android/systemui/stackdivider/
DMinimizedDockShadow.java54 int startColor = mContext.getResources().getColor( in updatePaint()
56 int endColor = mContext.getResources().getColor( in updatePaint()

12345678910>>...12