aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-29 03:55:11 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-29 04:23:30 +0200
commit975778839c33b676e3943c9c4f36ea04ea28a65b (patch)
tree096406fdf6f417c11e1f31d82641e85588509790 /app/src/main
parentMainActivity: only show two column on tablets (diff)
downloadwireguard-android-975778839c33b676e3943c9c4f36ea04ea28a65b.tar.xz
wireguard-android-975778839c33b676e3943c9c4f36ea04ea28a65b.zip
FloatingActionButonBehavior: set translation back to 0 when snackbar dies
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButtonBehavior.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButtonBehavior.java b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButtonBehavior.java
index 8067728e..c41687b0 100644
--- a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButtonBehavior.java
+++ b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButtonBehavior.java
@@ -29,4 +29,11 @@ public class FloatingActionButtonBehavior extends CoordinatorLayout.Behavior<Flo
child.setBehaviorYTranslation(Math.min(0, dependency.getTranslationY() - dependency.getMeasuredHeight()));
return true;
}
+
+ @Override
+ public void onDependentViewRemoved(final CoordinatorLayout parent, FloatingActionsMenu child,
+ final View dependency) {
+ // TODO(msf): animate this so it isn't so dramatic when the snackbar is swiped away
+ child.setBehaviorYTranslation(0);
+ }
}