@Override public void handleEntryTransition(IDecoratorState fromState) { mStateListener.onOverScrollStateChange(OverScrollBounceEffectDecoratorBase.this, fromState.getStateId(), this.getStateId()); Animator bounceBackAnim = createAnimator(); bounceBackAnim.addListener(this); bounceBackAnim.start(); }
@Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_MOVE: return mCurrentState.handleMoveTouchEvent(event); case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: return mCurrentState.handleUpOrCancelTouchEvent(event); } return false; }
@Override public int getCurrentState() { return mCurrentState.getStateId(); }
@Override public void handleEntryTransition(IDecoratorState fromState) { mCurrDragState = (mStartAttr.mDir ? STATE_DRAG_START_SIDE : STATE_DRAG_END_SIDE); mStateListener.onOverScrollStateChange(OverScrollBounceEffectDecoratorBase.this, fromState.getStateId(), this.getStateId()); } }
@Override public void handleEntryTransition(IDecoratorState fromState) { mStateListener.onOverScrollStateChange(OverScrollBounceEffectDecoratorBase.this, fromState.getStateId(), this.getStateId()); } }
protected void issueStateTransition(IDecoratorState state) { IDecoratorState oldState = mCurrentState; mCurrentState = state; mCurrentState.handleEntryTransition(oldState); }