/frameworks/base/core/tests/coretests/src/android/util/ |
StateSetTest.java | 23 * Tests for {@link StateSet} 31 int[] stateSet = new int[3]; 34 stateSet[0] = 1; 35 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); 37 stateSet[0] = 2; 38 assertFalse(StateSet.stateSetMatches(stateSpec, stateSet)); 39 // Add another state to the spec which the stateSet doesn't match 41 assertFalse(StateSet.stateSetMatches(stateSpec, stateSet)) [all...] |
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowStateListDrawable.java | 5 import android.util.StateSet; 34 public void addState(int[] stateSet, Drawable drawable) { 35 stateToDrawable.put(createStateList(stateSet), drawable); 41 * @param stateSet Int array describing the state 44 public Drawable getDrawableForState(int[] stateSet) { 45 return stateToDrawable.get(createStateList(stateSet)); 48 private List<Integer> createStateList(int[] stateSet) { 50 if (stateSet == StateSet.WILD_CARD) { 53 for (int state : stateSet) { [all...] |
/packages/apps/Messaging/src/com/android/messaging/util/ |
TintDrawableWrapper.java | 50 public boolean setState(int[] stateSet) { 51 boolean handled = super.setState(stateSet); 52 handled = updateTint(stateSet) || handled;
|
/cts/tests/tests/util/src/android/util/cts/ |
StateSetTest.java | 21 import android.util.StateSet; 24 * Test StateSet 35 int[] stateSet = {1, 2, 3}; 36 assertEquals(stateSet, StateSet.trimStateSet(stateSet, 3)); 38 int [] stateSet2 = StateSet.trimStateSet(stateSet, 2); 41 assertEquals(stateSet2[i - 1], stateSet[i - 1]); 46 int[] stateSet = {R.attr.state_window_focused [all...] |
/frameworks/base/graphics/java/android/graphics/drawable/ |
StateListDrawable.java | 33 import android.util.StateSet; 76 * @param stateSet - An array of resource Ids to associate with the image. 80 public void addState(int[] stateSet, Drawable drawable) { 82 mStateListState.addStateSet(stateSet, drawable); 94 protected boolean onStateChange(int[] stateSet) { 95 final boolean changed = super.onStateChange(stateSet); 97 int idx = mStateListState.indexOfStateSet(stateSet); 99 + Arrays.toString(stateSet) + " found " + idx); 101 idx = mStateListState.indexOfStateSet(StateSet.WILD_CARD); 220 states = StateSet.trimStateSet(states, j) [all...] |
AnimatedStateListDrawable.java | 30 import android.util.StateSet; 105 * @param stateSet An array of resource IDs to associate with the keyframe 109 public void addState(@NonNull int[] stateSet, @NonNull Drawable drawable, int id) { 114 mState.addStateSet(stateSet, drawable, id); 141 protected boolean onStateChange(int[] stateSet) { 144 final int targetIndex = mState.indexOfKeyframe(stateSet); 153 changed |= current.setState(stateSet); 601 int addStateSet(@NonNull int[] stateSet, @NonNull Drawable drawable, int id) { 602 final int index = super.addStateSet(stateSet, drawable); 607 int indexOfKeyframe(@NonNull int[] stateSet) { [all...] |
Drawable.java | 52 import android.util.StateSet; 179 private int[] mStateSet = StateSet.WILD_CARD; 719 * <p>Note: The Drawable holds a reference on to <var>stateSet</var> 723 * @param stateSet The new set of states to be displayed. 729 public boolean setState(@NonNull final int[] stateSet) { 730 if (!Arrays.equals(mStateSet, stateSet)) { 731 mStateSet = stateSet; 732 return onStateChange(stateSet); [all...] |
VectorDrawable.java | 389 protected boolean onStateChange(int[] stateSet) { 398 if (state.onStateChange(stateSet)) { [all...] |
RippleDrawable.java | 249 protected boolean onStateChange(int[] stateSet) { 250 final boolean changed = super.onStateChange(stateSet); 257 for (int state : stateSet) { [all...] |
/frameworks/support/graphics/drawable/static/tests/src/android/support/graphics/drawable/tests/ |
VectorDrawableTest.java | 141 private void verifyVectorDrawables(int[] resIds, int[] goldenImages, int[] stateSet) 147 if (stateSet != null) { 148 mVectorDrawable.setState(stateSet); 155 saveVectorDrawableIntoPNG(mBitmap, resIds, i, stateSet); 165 private void saveVectorDrawableIntoPNG(Bitmap bitmap, int[] resIds, int index, int[] stateSet) 179 String stateSetTitle = getTitleForStateSet(stateSet); 204 * @param stateSet a state set 208 private String getTitleForStateSet(int[] stateSet) { 209 if (stateSet == null || stateSet.length == 0) [all...] |
/frameworks/base/core/java/android/util/ |
StateSet.java | 38 public class StateSet { 120 public StateSet() {} 142 * Return whether the stateSet matches the desired stateSpec. 146 * @param stateSet an array of {@link android.view.View} states 148 public static boolean stateSetMatches(int[] stateSpec, int[] stateSet) { 149 if (stateSet == null) { 153 int stateSetSize = stateSet.length; 170 final int state = stateSet[j];
|
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
VectorDrawableTest.java | 227 private void verifyVectorDrawables(int[] resIds, int[] goldenImages, int[] stateSet) 252 if (stateSet != null) { 253 vectorDrawable.setState(stateSet); 260 saveVectorDrawableIntoPNG(mBitmap, resIds, i, stateSet); 274 private void saveVectorDrawableIntoPNG(Bitmap bitmap, int[] resIds, int index, int[] stateSet) 288 String stateSetTitle = getTitleForStateSet(stateSet); 313 * @param stateSet a state set 317 private String getTitleForStateSet(int[] stateSet) { 318 if (stateSet == null || stateSet.length == 0) [all...] |
DrawableWrapperTest.java | 32 import android.util.StateSet; 288 assertEquals("initial child state is empty", d.getState(), StateSet.WILD_CARD); 292 assertEquals("child state did not change", d.getState(), StateSet.WILD_CARD); 296 assertEquals("initial child state is empty", d.getState(), StateSet.WILD_CARD); 444 public boolean setState(final int[] stateSet) { 446 return super.setState(stateSet);
|
/frameworks/support/graphics/drawable/static/src/android/support/graphics/drawable/ |
VectorDrawableCommon.java | 223 public boolean setState(int[] stateSet) { 225 return mDelegateDrawable.setState(stateSet); 227 return super.setState(stateSet);
|
/packages/services/Car/car-support-lib/src/android/support/car/ui/ |
FabDrawable.java | 128 protected boolean onStateChange(int[] stateSet) { 129 boolean superChanged = super.onStateChange(stateSet); 134 for (int state : stateSet) {
|
/frameworks/support/compat/api21/android/support/v4/graphics/drawable/ |
DrawableWrapperLollipop.java | 90 public boolean setState(int[] stateSet) { 91 if (super.setState(stateSet)) {
|
/packages/apps/Settings/src/com/android/settings/drawable/ |
DrawableWrapper.java | 89 public boolean setState(final int[] stateSet) { 90 return mDrawable.setState(stateSet);
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/setup/ |
SetupStartIndicatorView.java | 117 final int[] stateSet = getDrawableState(); 118 final int color = mIndicatorColor.getColorForState(stateSet, 0);
|
/frameworks/opt/setupwizard/library/eclair-mr1/src/com/android/setupwizardlib/view/ |
NavigationBarButton.java | 132 public boolean setState(int[] stateSet) { 133 boolean needsInvalidate = super.setState(stateSet);
|
/frameworks/support/v7/appcompat/src/android/support/v7/graphics/drawable/ |
DrawableWrapper.java | 91 public boolean setState(final int[] stateSet) { 92 return mDrawable.setState(stateSet);
|
/frameworks/support/compat/gingerbread/android/support/v4/graphics/drawable/ |
DrawableWrapperGingerbread.java | 139 public boolean setState(final int[] stateSet) { 140 boolean handled = mDrawable.setState(stateSet); 141 handled = updateTint(stateSet) || handled;
|
/frameworks/support/v7/cardview/api21/android/support/v7/widget/ |
RoundRectDrawable.java | 182 protected boolean onStateChange(int[] stateSet) { 183 final int newColor = mBackground.getColorForState(stateSet, mBackground.getDefaultColor());
|
/prebuilts/sdk/current/support/v7/cardview/libs/ |
android-support-v7-cardview.jar | |
/frameworks/support/v7/appcompat/src/android/support/v7/widget/ |
ListViewCompat.java | 373 public boolean setState(int[] stateSet) { 375 return super.setState(stateSet);
|
/frameworks/support/v7/cardview/gingerbread/android/support/v7/widget/ |
RoundRectDrawableWithShadow.java | 200 protected boolean onStateChange(int[] stateSet) { 201 final int newColor = mBackground.getColorForState(stateSet, mBackground.getDefaultColor());
|