private int keyOfFirstMatchingStateSet(int[] stateSet) { int length = mStateSets.size(); for (int i = 0; i < length; i++) { if (StateSet.stateSetMatches(mStateSets.valueAt(i), stateSet)) { return mStateSets.keyAt(i); } } return -1; }
private int indexOfStateSet(int[] stateSet) { final int[][] stateSets = mStateSets; final int N = getChildCount(); for (int i = 0; i < N; i++) { if (StateSet.stateSetMatches(stateSets[i], stateSet)) { return i; } } return -1; }
@Override protected boolean onStateChange(int[] state) { boolean active = StateSet.stateSetMatches(STATE_SELECTED, state) | StateSet.stateSetMatches(STATE_PRESSED, state); if (active != mActive) { mActive = active; // Log.d("FolderTransitionDrawable", "onStateChange " + StateSet.dump(state) + " " + // active); if (!active) { unscheduleSelf(this); if (mAlpha != 255) { startTransition(false); } } else { scheduleSelf(this, SystemClock.uptimeMillis() + 500); } return true; } return false; }
private int keyOfBestMatchingStateSet(int[] stateSet) { int length = mStateSets.size(); int bestSize = 0; int result = -1; for (int i = 0; i < length; i++) { int[] matchingStateSet = mStateSets.valueAt(i); if (StateSet.stateSetMatches(matchingStateSet, stateSet) && matchingStateSet.length > bestSize) { bestSize = matchingStateSet.length; result = mStateSets.keyAt(i); } } return result; }
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:34:11.141 -0500", hash_original_method = "A182AEBDD3B8E6EFB499434DA2A68669", hash_generated_method = "D64FD17DD7405A33F3CB0F78E5709DE5") private int indexOfStateSet(int[] stateSet) { final int[][] stateSets = mStateSets; final int N = getChildCount(); for (int i = 0; i < N; i++) { if (StateSet.stateSetMatches(stateSets[i], stateSet)) { return i; } } return -1; }