Home
last modified time | relevance | path

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

12

/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()
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 …]
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()
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()
DDrawable.java732 public boolean setState(@NonNull final int[] stateSet) { in setState() argument
733 if (!Arrays.equals(mStateSet, stateSet)) { in setState()
734 mStateSet = stateSet; in setState()
735 return onStateChange(stateSet); in setState()
DVectorDrawable.java416 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
425 if (state.onStateChange(stateSet)) { in onStateChange()
1009 public boolean onStateChange(int[] stateSet) { in onStateChange() argument
1010 return mRootGroup.onStateChange(stateSet); in onStateChange()
1308 public boolean onStateChange(int[] stateSet) { in onStateChange() argument
1315 changed |= child.onStateChange(stateSet); in onStateChange()
1561 public boolean onStateChange(int[] stateSet) { in onStateChange() argument
1790 public boolean onStateChange(int[] stateSet) { in onStateChange() argument
1796 ((ColorStateList) mStrokeColors).getColorForState(stateSet, oldStrokeColor); in onStateChange()
1805 … final int newFillColor = ((ColorStateList) mFillColors).getColorForState(stateSet, oldFillColor); in onStateChange()
DRippleDrawable.java249 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
250 final boolean changed = super.onStateChange(stateSet); in onStateChange()
257 for (int state : stateSet) { in onStateChange()
DGradientDrawable.java374 final int[] stateSet = getState(); in setStroke() local
375 color = colorStateList.getColorForState(stateSet, 0); in setStroke()
918 final int[] stateSet = getState();
919 color = colorStateList.getColorForState(stateSet, 0);
940 protected boolean onStateChange(int[] stateSet) {
946 final int newColor = solidColors.getColorForState(stateSet, 0);
958 final int newColor = strokeColors.getColorForState(stateSet, 0);
DColorDrawable.java196 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
/frameworks/support/graphics/drawable/static/tests/src/android/support/graphics/drawable/tests/
DVectorDrawableTest.java147 private void verifyVectorDrawables(int[] resIds, int[] goldenImages, int[] stateSet) in verifyVectorDrawables() argument
153 if (stateSet != null) { in verifyVectorDrawables()
154 mVectorDrawable.setState(stateSet); in verifyVectorDrawables()
161 saveVectorDrawableIntoPNG(mBitmap, resIds, i, stateSet); in verifyVectorDrawables()
171 private void saveVectorDrawableIntoPNG(Bitmap bitmap, int[] resIds, int index, int[] stateSet) in saveVectorDrawableIntoPNG() argument
185 String stateSetTitle = getTitleForStateSet(stateSet); in saveVectorDrawableIntoPNG()
214 private String getTitleForStateSet(int[] stateSet) { in getTitleForStateSet() argument
215 if (stateSet == null || stateSet.length == 0) { in getTitleForStateSet()
220 for (int i = 0; i < stateSet.length; i++) { in getTitleForStateSet()
223 final String state = mResources.getResourceName(stateSet[i]); in getTitleForStateSet()
[all …]
/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/graphics/drawable/static/src/android/support/graphics/drawable/
DVectorDrawableCommon.java194 public boolean setState(int[] stateSet) { in setState() argument
196 return mDelegateDrawable.setState(stateSet); in setState()
198 return super.setState(stateSet); in setState()
/frameworks/support/compat/api21/android/support/v4/graphics/drawable/
DDrawableWrapperLollipop.java90 public boolean setState(int[] stateSet) { in setState() argument
91 if (super.setState(stateSet)) { in setState()
/frameworks/support/compat/gingerbread/android/support/v4/graphics/drawable/
DDrawableWrapperGingerbread.java139 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/
DNavigationBarButton.java132 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/
DDrawableWrapper.java95 public boolean setState(final int[] stateSet) { in setState() argument
96 return mDrawable.setState(stateSet); in setState()
/frameworks/base/core/java/com/android/internal/graphics/drawable/
DAnimationScaleListDrawable.java69 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
70 final boolean changed = super.onStateChange(stateSet); in onStateChange()
/frameworks/support/v7/cardview/api21/android/support/v7/widget/
DRoundRectDrawable.java182 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/
DListViewCompat.java377 public boolean setState(int[] stateSet) { in setState() argument
379 return super.setState(stateSet); in setState()
DSearchView.java991 final int[] stateSet = focused ? FOCUSED_STATE_SET : EMPTY_STATE_SET; in updateFocusedState() local
994 searchPlateBg.setState(stateSet); in updateFocusedState()
998 submitAreaBg.setState(stateSet); in updateFocusedState()
/frameworks/support/v7/cardview/gingerbread/android/support/v7/widget/
DRoundRectDrawableWithShadow.java200 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/
DColorStateList.java545 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/
DDatePickerCalendarDelegate.java226 final int[][] stateSet = new int[][] {{ R.attr.state_activated }, {}}; in applyLegacyColorFixes() local
228 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()
DTimePickerClockDelegate.java294 final int[][] stateSet = new int[][] {{ R.attr.state_activated }, {}}; in applyLegacyColorFixes() local
296 return new ColorStateList(stateSet, colors); in applyLegacyColorFixes()
DSimpleMonthView.java708 final int[] stateSet = StateSet.get(stateMask); in drawDays() local
709 dayTextColor = mDayTextColor.getColorForState(stateSet, 0); in drawDays()

12