Searched refs:stateSpec (Results 1 – 3 of 3) sorted by relevance
/frameworks/base/core/tests/coretests/src/android/util/ |
D | StateSetTest.java | 31 int[] stateSpec = new int[2]; in testStateSetPositiveMatches() local 34 stateSpec[0] = 1; in testStateSetPositiveMatches() 36 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches() 39 assertFalse(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches() 41 stateSpec[1] = 2; in testStateSetPositiveMatches() 42 assertFalse(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches() 45 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches() 48 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches() 53 int[] stateSpec = new int[2]; in testStatesSetMatchMixEmUp() local 57 stateSpec[0] = 1; in testStatesSetMatchMixEmUp() [all …]
|
/frameworks/base/core/java/android/util/ |
D | StateSet.java | 148 public static boolean stateSetMatches(int[] stateSpec, int[] stateSet) { in stateSetMatches() argument 150 return (stateSpec == null || isWildCard(stateSpec)); in stateSetMatches() 152 int stateSpecSize = stateSpec.length; in stateSetMatches() 155 int stateSpecState = stateSpec[i]; in stateSetMatches() 208 public static boolean stateSetMatches(int[] stateSpec, int state) { in stateSetMatches() argument 209 int stateSpecSize = stateSpec.length; in stateSetMatches() 211 int stateSpecState = stateSpec[i]; in stateSetMatches()
|
/frameworks/base/core/java/android/content/res/ |
D | ColorStateList.java | 342 int[] stateSpec = new int[numAttrs]; in inflate() local 351 stateSpec[j++] = attrs.getAttributeBooleanValue(i, false) in inflate() 355 stateSpec = StateSet.trimStateSet(stateSpec, j); in inflate() 361 if (listSize == 0 || stateSpec.length == 0) { in inflate() 371 stateSpecList = GrowingArrayUtils.append(stateSpecList, listSize, stateSpec); in inflate() 564 final int[] stateSpec = mStateSpecs[i]; in getColorForState() local 565 if (StateSet.stateSetMatches(stateSpec, stateSet)) { in getColorForState()
|