/** Called when a drawer animation has successfully completed. */ private void completeAnimation() { mScroller.abortAnimation(); final int finalX = mScroller.getFinalX(); setOffsetPixels(finalX); setDrawerState(finalX == 0 ? STATE_CLOSED : STATE_OPEN); stopLayerTranslation(); }
/** Called when the peek drawer animation has successfully completed. */ private void completePeek() { mPeekScroller.abortAnimation(); setOffsetPixels(0); setDrawerState(STATE_CLOSED); stopLayerTranslation(); }
/** Stops ongoing animation of the drawer. */ protected void stopAnimation() { removeCallbacks(mDragRunnable); mScroller.abortAnimation(); stopLayerTranslation(); }