Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
maxme committed Feb 12, 2016
1 parent 39d8421 commit 3825224
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ public static void showFab(final View view, final boolean show) {
float toY = (show ? 0f : max);

ObjectAnimator anim = ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, fromY, toY);
anim.setInterpolator(show ? new DecelerateInterpolator() : new AccelerateInterpolator());
if (show) {
anim.setInterpolator(new DecelerateInterpolator());
} else {
anim.setInterpolator(new AccelerateInterpolator());
}
anim.setDuration(show ? Duration.LONG.toMillis(context) : Duration.SHORT.toMillis(context));

anim.addListener(new AnimatorListenerAdapter() {
Expand Down

0 comments on commit 3825224

Please sign in to comment.