diff --git a/src/com/github/eddieringle/android/libs/undergarment/widgets/DrawerGarment.java b/src/com/github/eddieringle/android/libs/undergarment/widgets/DrawerGarment.java index 656979c..e59ff88 100644 --- a/src/com/github/eddieringle/android/libs/undergarment/widgets/DrawerGarment.java +++ b/src/com/github/eddieringle/android/libs/undergarment/widgets/DrawerGarment.java @@ -460,7 +460,7 @@ public void openDrawer(final boolean animate) { final int widthPixels = getResources().getDisplayMetrics().widthPixels; mScroller .startScroll(mDecorOffsetX, 0, (widthPixels - mTouchTargetWidth) - mDecorOffsetX, 0, - SCROLL_DURATION); + animate ? SCROLL_DURATION : 0); mScrollerHandler.postDelayed(new Runnable() { @Override @@ -501,7 +501,8 @@ public void closeDrawer(final boolean animate) { mDrawerMoving = true; final int widthPixels = getResources().getDisplayMetrics().widthPixels; - mScroller.startScroll(mDecorOffsetX, 0, -mDecorOffsetX, 0, SCROLL_DURATION); + mScroller.startScroll(mDecorOffsetX, 0, -mDecorOffsetX, 0, + animate ? SCROLL_DURATION : 0); mScrollerHandler.postDelayed(new Runnable() { @Override