Clean up more codes

This commit is contained in:
LoveSy
2023-03-17 20:08:31 +08:00
committed by John Wu
parent 5c325d9466
commit 54ecc001f4
10 changed files with 8 additions and 23 deletions

View File

@@ -23,8 +23,6 @@ public class ConcealableBottomNavigationView extends BottomNavigationView {
};
private boolean isHidden;
private int lastHeight = -1;
public ConcealableBottomNavigationView(@NonNull Context context) {
this(context, null);
}
@@ -42,14 +40,6 @@ public class ConcealableBottomNavigationView extends BottomNavigationView {
}
private void recreateAnimator(int height) {
if (lastHeight == height) return;
lastHeight = height;
// End the current animation before setting a new one
// otherwise it crashes on Android 5.0
StateListAnimator lastAnimator = getStateListAnimator();
if (lastAnimator != null) lastAnimator.jumpToCurrentState();
Animator toHidden = ObjectAnimator.ofFloat(this, "translationY", height);
toHidden.setDuration(175);
toHidden.setInterpolator(new FastOutLinearInInterpolator());