mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-26 18:17:39 +00:00
Fix raw use of generics warnings
This commit is contained in:
parent
b4d95977d0
commit
651547ef20
@ -25,7 +25,8 @@ import java.util.List;
|
|||||||
* Remember to use the correct namespace for the fab:
|
* Remember to use the correct namespace for the fab:
|
||||||
* xmlns:app="http://schemas.android.com/apk/res-auto"
|
* xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
*/
|
*/
|
||||||
public class FABBehavior extends CoordinatorLayout.Behavior {
|
public class FABBehavior extends CoordinatorLayout.Behavior<View> {
|
||||||
|
|
||||||
private float mTranslationY;
|
private float mTranslationY;
|
||||||
|
|
||||||
public FABBehavior(Context context, AttributeSet attrs) {
|
public FABBehavior(Context context, AttributeSet attrs) {
|
||||||
@ -74,11 +75,11 @@ public class FABBehavior extends CoordinatorLayout.Behavior {
|
|||||||
|
|
||||||
private float getTranslationY(CoordinatorLayout parent, View child) {
|
private float getTranslationY(CoordinatorLayout parent, View child) {
|
||||||
float minOffset = 0.0F;
|
float minOffset = 0.0F;
|
||||||
List dependencies = parent.getDependencies(child);
|
List<View> dependencies = parent.getDependencies(child);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for (int z = dependencies.size(); i < z; ++i) {
|
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)) {
|
if (view instanceof Snackbar.SnackbarLayout && parent.doViewsOverlap(child, view)) {
|
||||||
minOffset = Math.min(minOffset, ViewCompat.getTranslationY(view) - (float) view.getHeight());
|
minOffset = Math.min(minOffset, ViewCompat.getTranslationY(view) - (float) view.getHeight());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user