aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarsh Shandilya <harsh@prjkt.io>2018-08-13 14:37:21 +0530
committerJason A. Donenfeld <Jason@zx2c4.com>2018-08-26 10:53:44 -0600
commitf35ecb0ba90e8779974818600ae527a98877a25d (patch)
tree8bfe4008cd98018ea53d4fb829000f1c356f8f91
parentQuickTileService: Don't use deprecated getDrawable method (diff)
downloadwireguard-android-hs/misc.tar.xz
wireguard-android-hs/misc.zip
fab: Cleanup up method declarationshs/misc
Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
-rw-r--r--app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButtonBehavior.java14
1 files changed, 8 insertions, 6 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 c41687b..7a14d40 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
@@ -9,6 +9,8 @@ package com.wireguard.android.widget.fab;
import android.content.Context;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.Snackbar;
+
+import android.annotation.NonNull;
import android.util.AttributeSet;
import android.view.View;
@@ -18,21 +20,21 @@ public class FloatingActionButtonBehavior extends CoordinatorLayout.Behavior<Flo
}
@Override
- public boolean layoutDependsOn(final CoordinatorLayout parent, final FloatingActionsMenu child,
- final View dependency) {
+ public boolean layoutDependsOn(@NonNull final CoordinatorLayout parent, @NonNull final FloatingActionsMenu child,
+ @NonNull final View dependency) {
return dependency instanceof Snackbar.SnackbarLayout;
}
@Override
- public boolean onDependentViewChanged(final CoordinatorLayout parent, final FloatingActionsMenu child,
- final View dependency) {
+ public boolean onDependentViewChanged(@NonNull final CoordinatorLayout parent, @NonNull final FloatingActionsMenu child,
+ @NonNull final View dependency) {
child.setBehaviorYTranslation(Math.min(0, dependency.getTranslationY() - dependency.getMeasuredHeight()));
return true;
}
@Override
- public void onDependentViewRemoved(final CoordinatorLayout parent, FloatingActionsMenu child,
- final View dependency) {
+ public void onDependentViewRemoved(@NonNull final CoordinatorLayout parent, @NonNull final FloatingActionsMenu child,
+ @NonNull final View dependency) {
// TODO(msf): animate this so it isn't so dramatic when the snackbar is swiped away
child.setBehaviorYTranslation(0);
}