/frameworks/base/core/tests/coretests/src/android/util/ |
D | StateSetTest.java | 31 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/ |
D | StateListDrawable.java | 92 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 …]
|
D | AnimatedStateListDrawable.java | 109 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()
|
D | Drawable.java | 596 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()
|
D | GradientDrawable.java | 317 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);
|
D | RippleDrawable.java | 259 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument 260 final boolean changed = super.onStateChange(stateSet); in onStateChange() 266 for (int state : stateSet) { in onStateChange()
|
D | ColorDrawable.java | 193 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
|
D | ShapeDrawable.java | 338 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
|
D | NinePatchDrawable.java | 576 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
|
D | BitmapDrawable.java | 697 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
|
D | VectorDrawable.java | 337 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
|
/frameworks/base/core/java/android/util/ |
D | StateSet.java | 60 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/ |
D | TintDrawableWrapper.java | 52 public boolean setState(int[] stateSet) { in setState() argument 53 boolean handled = super.setState(stateSet); in setState() 54 handled = updateTint(stateSet) || handled; in setState()
|
D | DrawableWrapper.java | 91 public boolean setState(final int[] stateSet) { in setState() argument 92 return mDrawable.setState(stateSet); in setState()
|
D | ListViewCompat.java | 341 public boolean setState(int[] stateSet) { in setState() argument 343 return super.setState(stateSet); in setState()
|
/frameworks/base/core/java/android/content/res/ |
D | ColorStateList.java | 296 public int getColorForState(int[] stateSet, int defaultColor) { in getColorForState() argument 300 if (StateSet.stateSetMatches(stateSpec, stateSet)) { in getColorForState()
|
/frameworks/base/core/java/android/widget/ |
D | ExpandableListView.java | 501 final int stateSet[] = pos.position.flatListPos == pos.groupMetadata.lastChildFlPos in getIndicator() local 504 indicator.setState(stateSet); in getIndicator()
|
D | SearchView.java | 872 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()
|