summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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);
+ }
}