apkfuckery/com.discord/smali/androidx/recyclerview/widget/ItemTouchUIUtilImpl.smali

166 lines
3.8 KiB
Smali
Raw Normal View History

2020-11-12 02:11:44 +00:00
.class public Landroidx/recyclerview/widget/ItemTouchUIUtilImpl;
.super Ljava/lang/Object;
.source "ItemTouchUIUtilImpl.java"
# interfaces
.implements Landroidx/recyclerview/widget/ItemTouchUIUtil;
# static fields
.field public static final INSTANCE:Landroidx/recyclerview/widget/ItemTouchUIUtil;
# direct methods
.method public static constructor <clinit>()V
.locals 1
new-instance v0, Landroidx/recyclerview/widget/ItemTouchUIUtilImpl;
invoke-direct {v0}, Landroidx/recyclerview/widget/ItemTouchUIUtilImpl;-><init>()V
sput-object v0, Landroidx/recyclerview/widget/ItemTouchUIUtilImpl;->INSTANCE:Landroidx/recyclerview/widget/ItemTouchUIUtil;
return-void
.end method
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
2020-11-21 22:11:07 +00:00
.method private static findMaxElevation(Landroidx/recyclerview/widget/RecyclerView;Landroid/view/View;)F
2020-11-12 02:11:44 +00:00
.locals 5
invoke-virtual {p0}, Landroid/view/ViewGroup;->getChildCount()I
move-result v0
const/4 v1, 0x0
const/4 v2, 0x0
:goto_0
if-ge v2, v0, :cond_2
invoke-virtual {p0, v2}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
move-result-object v3
if-ne v3, p1, :cond_0
goto :goto_1
:cond_0
invoke-static {v3}, Landroidx/core/view/ViewCompat;->getElevation(Landroid/view/View;)F
move-result v3
cmpl-float v4, v3, v1
if-lez v4, :cond_1
move v1, v3
:cond_1
:goto_1
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_2
return v1
.end method
# virtual methods
.method public clearView(Landroid/view/View;)V
2020-11-21 22:11:07 +00:00
.locals 3
2020-11-12 02:11:44 +00:00
sget v0, Landroidx/recyclerview/R$id;->item_touch_helper_previous_elevation:I
invoke-virtual {p1, v0}, Landroid/view/View;->getTag(I)Ljava/lang/Object;
2020-11-21 22:11:07 +00:00
move-result-object v1
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
instance-of v2, v1, Ljava/lang/Float;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
if-eqz v2, :cond_0
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
check-cast v1, Ljava/lang/Float;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
invoke-virtual {v1}, Ljava/lang/Float;->floatValue()F
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
move-result v1
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
invoke-static {p1, v1}, Landroidx/core/view/ViewCompat;->setElevation(Landroid/view/View;F)V
2020-11-12 02:11:44 +00:00
:cond_0
const/4 v1, 0x0
invoke-virtual {p1, v0, v1}, Landroid/view/View;->setTag(ILjava/lang/Object;)V
const/4 v0, 0x0
invoke-virtual {p1, v0}, Landroid/view/View;->setTranslationX(F)V
invoke-virtual {p1, v0}, Landroid/view/View;->setTranslationY(F)V
return-void
.end method
.method public onDraw(Landroid/graphics/Canvas;Landroidx/recyclerview/widget/RecyclerView;Landroid/view/View;FFIZ)V
.locals 0
if-eqz p7, :cond_0
sget p1, Landroidx/recyclerview/R$id;->item_touch_helper_previous_elevation:I
invoke-virtual {p3, p1}, Landroid/view/View;->getTag(I)Ljava/lang/Object;
2020-11-21 22:11:07 +00:00
move-result-object p6
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
if-nez p6, :cond_0
2020-11-12 02:11:44 +00:00
invoke-static {p3}, Landroidx/core/view/ViewCompat;->getElevation(Landroid/view/View;)F
2020-11-21 22:11:07 +00:00
move-result p6
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
invoke-static {p6}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
move-result-object p6
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const/high16 p7, 0x3f800000 # 1.0f
2020-11-12 02:11:44 +00:00
invoke-static {p2, p3}, Landroidx/recyclerview/widget/ItemTouchUIUtilImpl;->findMaxElevation(Landroidx/recyclerview/widget/RecyclerView;Landroid/view/View;)F
move-result p2
2020-11-21 22:11:07 +00:00
add-float/2addr p2, p7
2020-11-12 02:11:44 +00:00
invoke-static {p3, p2}, Landroidx/core/view/ViewCompat;->setElevation(Landroid/view/View;F)V
2020-11-21 22:11:07 +00:00
invoke-virtual {p3, p1, p6}, Landroid/view/View;->setTag(ILjava/lang/Object;)V
2020-11-12 02:11:44 +00:00
:cond_0
invoke-virtual {p3, p4}, Landroid/view/View;->setTranslationX(F)V
invoke-virtual {p3, p5}, Landroid/view/View;->setTranslationY(F)V
return-void
.end method
.method public onDrawOver(Landroid/graphics/Canvas;Landroidx/recyclerview/widget/RecyclerView;Landroid/view/View;FFIZ)V
.locals 0
return-void
.end method
.method public onSelected(Landroid/view/View;)V
.locals 0
return-void
.end method