From 651547ef2031c3f5e5a70d0dd586aeccc10a1366 Mon Sep 17 00:00:00 2001 From: tonymanou Date: Thu, 26 Jan 2017 20:42:32 +0100 Subject: [PATCH] Fix raw use of generics warnings --- .../main/java/com/topjohnwu/magisk/utils/FABBehavior.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/FABBehavior.java b/app/src/main/java/com/topjohnwu/magisk/utils/FABBehavior.java index 561e5cd1d..cd9e73d60 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/FABBehavior.java +++ b/app/src/main/java/com/topjohnwu/magisk/utils/FABBehavior.java @@ -25,7 +25,8 @@ import java.util.List; * Remember to use the correct namespace for the fab: * xmlns:app="http://schemas.android.com/apk/res-auto" */ -public class FABBehavior extends CoordinatorLayout.Behavior { +public class FABBehavior extends CoordinatorLayout.Behavior { + private float mTranslationY; public FABBehavior(Context context, AttributeSet attrs) { @@ -74,11 +75,11 @@ public class FABBehavior extends CoordinatorLayout.Behavior { private float getTranslationY(CoordinatorLayout parent, View child) { float minOffset = 0.0F; - List dependencies = parent.getDependencies(child); + List dependencies = parent.getDependencies(child); int i = 0; for (int z = dependencies.size(); i < z; ++i) { - View view = (View) dependencies.get(i); + View view = dependencies.get(i); if (view instanceof Snackbar.SnackbarLayout && parent.doViewsOverlap(child, view)) { minOffset = Math.min(minOffset, ViewCompat.getTranslationY(view) - (float) view.getHeight()); }