Skip to content

Commit

Permalink
Respect the animate parameter when opening/closing the drawer.
Browse files Browse the repository at this point in the history
Signed-off-by: Eddie Ringle <eddie@eringle.net>
  • Loading branch information
EddieRingle committed Sep 5, 2012
1 parent e5212bd commit 049f403
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 049f403

Please sign in to comment.