Home
last modified time | relevance | path

Searched refs:stateSet (Results 1 – 23 of 23) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/util/
DStateSetTest.java31 int[] stateSet = new int[3]; in testStateSetPositiveMatches() local
34 stateSet[0] = 1; in testStateSetPositiveMatches()
35 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches()
37 stateSet[0] = 2; in testStateSetPositiveMatches()
38 assertFalse(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches()
41 assertFalse(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches()
43 stateSet[1] = 1; in testStateSetPositiveMatches()
44 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches()
46 stateSet[2] = 12345; in testStateSetPositiveMatches()
47 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches()
[all …]
/frameworks/base/graphics/java/android/graphics/drawable/
DStateListDrawable.java80 public void addState(int[] stateSet, Drawable drawable) { in addState() argument
82 mStateListState.addStateSet(stateSet, drawable); in addState()
94 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
95 final boolean changed = super.onStateChange(stateSet); in onStateChange()
97 int idx = mStateListState.indexOfStateSet(stateSet); in onStateChange()
99 + Arrays.toString(stateSet) + " found " + idx); in onStateChange()
274 public int getStateDrawableIndex(int[] stateSet) { in getStateDrawableIndex() argument
275 return mStateListState.indexOfStateSet(stateSet); in getStateDrawableIndex()
327 int addStateSet(int[] stateSet, Drawable drawable) { in addStateSet() argument
329 mStateSets[pos] = stateSet; in addStateSet()
[all …]
DAnimatedStateListDrawable.java109 public void addState(@NonNull int[] stateSet, @NonNull Drawable drawable, int id) { in addState() argument
114 mState.addStateSet(stateSet, drawable, id); in addState()
141 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
144 final int targetIndex = mState.indexOfKeyframe(stateSet); in onStateChange()
153 changed |= current.setState(stateSet); in onStateChange()
600 int addStateSet(@NonNull int[] stateSet, @NonNull Drawable drawable, int id) { in addStateSet() argument
601 final int index = super.addStateSet(stateSet, drawable); in addStateSet()
606 int indexOfKeyframe(@NonNull int[] stateSet) { in indexOfKeyframe() argument
607 final int index = super.indexOfStateSet(stateSet); in indexOfKeyframe()
DDrawable.java677 public boolean setState(final int[] stateSet) { in setState() argument
678 if (!Arrays.equals(mStateSet, stateSet)) { in setState()
679 mStateSet = stateSet; in setState()
680 return onStateChange(stateSet); in setState()
DGradientDrawable.java319 final int[] stateSet = getState(); in setStroke() local
320 color = colorStateList.getColorForState(stateSet, 0); in setStroke()
745 final int[] stateSet = getState();
746 color = colorStateList.getColorForState(stateSet, 0);
753 protected boolean onStateChange(int[] stateSet) {
759 final int newColor = solidColors.getColorForState(stateSet, 0);
771 final int newColor = strokeColors.getColorForState(stateSet, 0);
DRippleDrawable.java243 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
244 final boolean changed = super.onStateChange(stateSet); in onStateChange()
250 for (int state : stateSet) { in onStateChange()
DColorDrawable.java195 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
DShapeDrawable.java337 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
DNinePatchDrawable.java592 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
DBitmapDrawable.java703 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
DVectorDrawable.java382 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
/frameworks/base/core/java/android/util/
DStateSet.java148 public static boolean stateSetMatches(int[] stateSpec, int[] stateSet) { in stateSetMatches() argument
149 if (stateSet == null) { in stateSetMatches()
153 int stateSetSize = stateSet.length; in stateSetMatches()
170 final int state = stateSet[j]; in stateSetMatches()
/frameworks/support/v4/donut/android/support/v4/graphics/drawable/
DDrawableWrapperDonut.java96 public boolean setState(final int[] stateSet) { in setState() argument
97 boolean handled = mDrawable.setState(stateSet); in setState()
98 handled = updateTint(stateSet) || handled; in setState()
/frameworks/support/v7/appcompat/src/android/support/v7/graphics/drawable/
DDrawableWrapper.java91 public boolean setState(final int[] stateSet) { in setState() argument
92 return mDrawable.setState(stateSet); in setState()
/frameworks/support/v7/appcompat/src/android/support/v7/internal/widget/
DListViewCompat.java350 public boolean setState(int[] stateSet) { in setState() argument
352 return super.setState(stateSet); in setState()
/frameworks/base/core/java/android/content/res/
DColorStateList.java489 public int getColorForState(@Nullable int[] stateSet, int defaultColor) { in getColorForState() argument
493 if (StateSet.stateSetMatches(stateSpec, stateSet)) { in getColorForState()
/frameworks/base/core/java/android/widget/
DDatePickerCalendarDelegate.java224 final int[][] stateSet = new int[][] {{ R.attr.state_activated }, {}}; in applyLegacyColorFixes() local
226 return new ColorStateList(stateSet, colors); in applyLegacyColorFixes()
DExpandableListView.java499 final int stateSet[] = pos.position.flatListPos == pos.groupMetadata.lastChildFlPos in getIndicator() local
502 indicator.setState(stateSet); in getIndicator()
DSimpleMonthView.java455 final int[] stateSet = StateSet.get(stateMask); in drawDays() local
456 dayTextColor = mDayTextColor.getColorForState(stateSet, 0); in drawDays()
DSearchView.java883 final int[] stateSet = focused ? FOCUSED_STATE_SET : EMPTY_STATE_SET; in updateFocusedState() local
886 searchPlateBg.setState(stateSet); in updateFocusedState()
890 submitAreaBg.setState(stateSet); in updateFocusedState()
DTimePickerClockDelegate.java269 final int[][] stateSet = new int[][] {{ R.attr.state_activated }, {}}; in applyLegacyColorFixes() local
271 return new ColorStateList(stateSet, colors); in applyLegacyColorFixes()
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
DSearchView.java897 final int[] stateSet = focused ? FOCUSED_STATE_SET : EMPTY_STATE_SET; in updateFocusedState() local
900 searchPlateBg.setState(stateSet); in updateFocusedState()
904 submitAreaBg.setState(stateSet); in updateFocusedState()
/frameworks/support/graphics/drawable/static/src/android/support/graphics/drawable/
DVectorDrawableCompat.java345 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument