Home
last modified time | relevance | path

Searched refs:stateSet (Results 1 – 18 of 18) 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.java92 public void addState(int[] stateSet, Drawable drawable) { in addState() argument
94 mStateListState.addStateSet(stateSet, drawable); in addState()
106 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
107 int idx = mStateListState.indexOfStateSet(stateSet); in onStateChange()
109 + Arrays.toString(stateSet) + " found " + idx); in onStateChange()
116 return super.onStateChange(stateSet); in onStateChange()
286 public int getStateDrawableIndex(int[] stateSet) { in getStateDrawableIndex() argument
287 return mStateListState.indexOfStateSet(stateSet); in getStateDrawableIndex()
348 int addStateSet(int[] stateSet, Drawable drawable) { in addStateSet() argument
350 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.java596 public boolean setState(final int[] stateSet) { in setState() argument
597 if (!Arrays.equals(mStateSet, stateSet)) { in setState()
598 mStateSet = stateSet; in setState()
599 return onStateChange(stateSet); in setState()
DGradientDrawable.java317 final int[] stateSet = getState(); in setStroke() local
318 color = colorStateList.getColorForState(stateSet, 0); in setStroke()
741 final int[] stateSet = getState();
742 color = colorStateList.getColorForState(stateSet, 0);
749 protected boolean onStateChange(int[] stateSet) {
755 final int newColor = stateList.getColorForState(stateSet, 0);
767 final int newStrokeColor = strokeStateList.getColorForState(stateSet, 0);
DRippleDrawable.java259 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
260 final boolean changed = super.onStateChange(stateSet); in onStateChange()
266 for (int state : stateSet) { in onStateChange()
DColorDrawable.java193 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
DShapeDrawable.java338 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
DNinePatchDrawable.java576 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
DBitmapDrawable.java697 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
DVectorDrawable.java337 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
/frameworks/base/core/java/android/util/
DStateSet.java60 public static boolean stateSetMatches(int[] stateSpec, int[] stateSet) { in stateSetMatches() argument
61 if (stateSet == null) { in stateSetMatches()
65 int stateSetSize = stateSet.length; in stateSetMatches()
82 final int state = stateSet[j]; in stateSetMatches()
/frameworks/support/v7/appcompat/src/android/support/v7/internal/widget/
DTintDrawableWrapper.java52 public boolean setState(int[] stateSet) { in setState() argument
53 boolean handled = super.setState(stateSet); in setState()
54 handled = updateTint(stateSet) || handled; in setState()
DDrawableWrapper.java91 public boolean setState(final int[] stateSet) { in setState() argument
92 return mDrawable.setState(stateSet); in setState()
DListViewCompat.java341 public boolean setState(int[] stateSet) { in setState() argument
343 return super.setState(stateSet); in setState()
/frameworks/base/core/java/android/content/res/
DColorStateList.java296 public int getColorForState(int[] stateSet, int defaultColor) { in getColorForState() argument
300 if (StateSet.stateSetMatches(stateSpec, stateSet)) { in getColorForState()
/frameworks/base/core/java/android/widget/
DExpandableListView.java501 final int stateSet[] = pos.position.flatListPos == pos.groupMetadata.lastChildFlPos in getIndicator() local
504 indicator.setState(stateSet); in getIndicator()
DSearchView.java872 final int[] stateSet = focused ? FOCUSED_STATE_SET : EMPTY_STATE_SET; in updateFocusedState() local
875 searchPlateBg.setState(stateSet); in updateFocusedState()
879 submitAreaBg.setState(stateSet); in updateFocusedState()