public void updateDrawableState ( int state , boolean flag ) { final int oldState = mCombinedState ; // Update the combined state flag if ( flag ) mCombinedState |= state ; else mCombinedState &= ~ state ; // Set the combined state if ( oldState != mCombinedState ) { setState ( VIEW_STATE_SETS [ mCombinedState ] ) ; } }
Either remove or add a state to the combined state .