Home
last modified time | relevance | path

Searched refs:stateSpec (Results 1 – 3 of 3) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/util/
DStateSetTest.java30 int[] stateSpec = new int[2]; in testStateSetPositiveMatches() local
33 stateSpec[0] = 1; in testStateSetPositiveMatches()
35 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches()
38 assertFalse(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches()
40 stateSpec[1] = 2; in testStateSetPositiveMatches()
41 assertFalse(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches()
44 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches()
47 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches()
52 int[] stateSpec = new int[2]; in testStatesSetMatchMixEmUp() local
56 stateSpec[0] = 1; in testStatesSetMatchMixEmUp()
[all …]
/frameworks/base/core/java/android/util/
DStateSet.java148 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/
DColorStateList.java284 int[] stateSpec = new int[numAttrs]; in inflate() local
293 stateSpec[j++] = attrs.getAttributeBooleanValue(i, false) in inflate()
297 stateSpec = StateSet.trimStateSet(stateSpec, j); in inflate()
303 if (listSize == 0 || stateSpec.length == 0) { in inflate()
313 stateSpecList = GrowingArrayUtils.append(stateSpecList, listSize, stateSpec); in inflate()
492 final int[] stateSpec = mStateSpecs[i]; in getColorForState() local
493 if (StateSet.stateSetMatches(stateSpec, stateSet)) { in getColorForState()