/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 | 80 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() 275 public int getStateDrawableIndex(int[] stateSet) { in getStateDrawableIndex() argument 276 return mStateListState.indexOfStateSet(stateSet); in getStateDrawableIndex() 328 int addStateSet(int[] stateSet, Drawable drawable) { in addStateSet() argument 330 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() 601 int addStateSet(@NonNull int[] stateSet, @NonNull Drawable drawable, int id) { in addStateSet() argument 602 final int index = super.addStateSet(stateSet, drawable); in addStateSet() 607 int indexOfKeyframe(@NonNull int[] stateSet) { in indexOfKeyframe() argument 608 final int index = super.indexOfStateSet(stateSet); in indexOfKeyframe()
|
D | Drawable.java | 729 public boolean setState(@NonNull final int[] stateSet) { in setState() argument 730 if (!Arrays.equals(mStateSet, stateSet)) { in setState() 731 mStateSet = stateSet; in setState() 732 return onStateChange(stateSet); in setState()
|
D | VectorDrawable.java | 389 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument 398 if (state.onStateChange(stateSet)) { in onStateChange() 978 public boolean onStateChange(int[] stateSet) { in onStateChange() argument 979 return mRootGroup.onStateChange(stateSet); in onStateChange() 1277 public boolean onStateChange(int[] stateSet) { in onStateChange() argument 1284 changed |= child.onStateChange(stateSet); in onStateChange() 1530 public boolean onStateChange(int[] stateSet) { in onStateChange() argument 1759 public boolean onStateChange(int[] stateSet) { in onStateChange() argument 1765 ((ColorStateList) mStrokeColors).getColorForState(stateSet, oldStrokeColor); in onStateChange() 1774 … final int newFillColor = ((ColorStateList) mFillColors).getColorForState(stateSet, oldFillColor); in onStateChange()
|
D | RippleDrawable.java | 249 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument 250 final boolean changed = super.onStateChange(stateSet); in onStateChange() 257 for (int state : stateSet) { in onStateChange()
|
D | GradientDrawable.java | 374 final int[] stateSet = getState(); in setStroke() local 375 color = colorStateList.getColorForState(stateSet, 0); in setStroke() 890 final int[] stateSet = getState(); 891 color = colorStateList.getColorForState(stateSet, 0); 912 protected boolean onStateChange(int[] stateSet) { 918 final int newColor = solidColors.getColorForState(stateSet, 0); 930 final int newColor = strokeColors.getColorForState(stateSet, 0);
|
D | ColorDrawable.java | 196 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
|
/frameworks/support/graphics/drawable/static/tests/src/android/support/graphics/drawable/tests/ |
D | VectorDrawableTest.java | 141 private void verifyVectorDrawables(int[] resIds, int[] goldenImages, int[] stateSet) in verifyVectorDrawables() argument 147 if (stateSet != null) { in verifyVectorDrawables() 148 mVectorDrawable.setState(stateSet); in verifyVectorDrawables() 155 saveVectorDrawableIntoPNG(mBitmap, resIds, i, stateSet); in verifyVectorDrawables() 165 private void saveVectorDrawableIntoPNG(Bitmap bitmap, int[] resIds, int index, int[] stateSet) in saveVectorDrawableIntoPNG() argument 179 String stateSetTitle = getTitleForStateSet(stateSet); in saveVectorDrawableIntoPNG() 208 private String getTitleForStateSet(int[] stateSet) { in getTitleForStateSet() argument 209 if (stateSet == null || stateSet.length == 0) { in getTitleForStateSet() 214 for (int i = 0; i < stateSet.length; i++) { in getTitleForStateSet() 217 final String state = mResources.getResourceName(stateSet[i]); in getTitleForStateSet() [all …]
|
/frameworks/base/core/java/android/util/ |
D | StateSet.java | 148 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/graphics/drawable/static/src/android/support/graphics/drawable/ |
D | VectorDrawableCommon.java | 223 public boolean setState(int[] stateSet) { in setState() argument 225 return mDelegateDrawable.setState(stateSet); in setState() 227 return super.setState(stateSet); in setState()
|
/frameworks/support/compat/api21/android/support/v4/graphics/drawable/ |
D | DrawableWrapperLollipop.java | 90 public boolean setState(int[] stateSet) { in setState() argument 91 if (super.setState(stateSet)) { in setState()
|
/frameworks/support/compat/gingerbread/android/support/v4/graphics/drawable/ |
D | DrawableWrapperGingerbread.java | 139 public boolean setState(final int[] stateSet) { in setState() argument 140 boolean handled = mDrawable.setState(stateSet); in setState() 141 handled = updateTint(stateSet) || handled; in setState()
|
/frameworks/opt/setupwizard/library/eclair-mr1/src/com/android/setupwizardlib/view/ |
D | NavigationBarButton.java | 132 public boolean setState(int[] stateSet) { in setState() argument 133 boolean needsInvalidate = super.setState(stateSet); in setState()
|
/frameworks/support/v7/appcompat/src/android/support/v7/graphics/drawable/ |
D | DrawableWrapper.java | 91 public boolean setState(final int[] stateSet) { in setState() argument 92 return mDrawable.setState(stateSet); in setState()
|
/frameworks/support/v7/cardview/api21/android/support/v7/widget/ |
D | RoundRectDrawable.java | 182 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument 183 final int newColor = mBackground.getColorForState(stateSet, mBackground.getDefaultColor()); in onStateChange()
|
/frameworks/support/v7/appcompat/src/android/support/v7/widget/ |
D | ListViewCompat.java | 373 public boolean setState(int[] stateSet) { in setState() argument 375 return super.setState(stateSet); in setState()
|
D | SearchView.java | 981 final int[] stateSet = focused ? FOCUSED_STATE_SET : EMPTY_STATE_SET; in updateFocusedState() local 984 searchPlateBg.setState(stateSet); in updateFocusedState() 988 submitAreaBg.setState(stateSet); in updateFocusedState()
|
/frameworks/support/v7/cardview/gingerbread/android/support/v7/widget/ |
D | RoundRectDrawableWithShadow.java | 200 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument 201 final int newColor = mBackground.getColorForState(stateSet, mBackground.getDefaultColor()); in onStateChange()
|
/frameworks/base/core/java/android/content/res/ |
D | ColorStateList.java | 545 public int getColorForState(@Nullable int[] stateSet, int defaultColor) { in getColorForState() argument 549 if (StateSet.stateSetMatches(stateSpec, stateSet)) { in getColorForState()
|
/frameworks/base/core/java/android/widget/ |
D | DatePickerCalendarDelegate.java | 226 final int[][] stateSet = new int[][] {{ R.attr.state_activated }, {}}; in applyLegacyColorFixes() local 228 return new ColorStateList(stateSet, colors); in applyLegacyColorFixes()
|
D | ExpandableListView.java | 499 final int stateSet[] = pos.position.flatListPos == pos.groupMetadata.lastChildFlPos in getIndicator() local 502 indicator.setState(stateSet); in getIndicator()
|
D | TimePickerClockDelegate.java | 294 final int[][] stateSet = new int[][] {{ R.attr.state_activated }, {}}; in applyLegacyColorFixes() local 296 return new ColorStateList(stateSet, colors); in applyLegacyColorFixes()
|
D | SimpleMonthView.java | 708 final int[] stateSet = StateSet.get(stateMask); in drawDays() local 709 dayTextColor = mDayTextColor.getColorForState(stateSet, 0); in drawDays()
|
D | SearchView.java | 949 final int[] stateSet = focused ? FOCUSED_STATE_SET : EMPTY_STATE_SET; in updateFocusedState() local 952 searchPlateBg.setState(stateSet); in updateFocusedState() 956 submitAreaBg.setState(stateSet); in updateFocusedState()
|