apkfuckery/com.discord/smali/androidx/recyclerview/widget/ItemTouchUIUtilImpl.smali
2020-11-13 19:18:44 +00:00

165 lines
3.8 KiB
Smali

.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
.method private static findMaxElevation(Landroidx/recyclerview/widget/RecyclerView;Landroid/view/View;)F
.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
.locals 3
sget v0, Landroidx/recyclerview/R$id;->item_touch_helper_previous_elevation:I
invoke-virtual {p1, v0}, Landroid/view/View;->getTag(I)Ljava/lang/Object;
move-result-object v1
instance-of v2, v1, Ljava/lang/Float;
if-eqz v2, :cond_0
check-cast v1, Ljava/lang/Float;
invoke-virtual {v1}, Ljava/lang/Float;->floatValue()F
move-result v1
invoke-static {p1, v1}, Landroidx/core/view/ViewCompat;->setElevation(Landroid/view/View;F)V
: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;
move-result-object p6
if-nez p6, :cond_0
invoke-static {p3}, Landroidx/core/view/ViewCompat;->getElevation(Landroid/view/View;)F
move-result p6
invoke-static {p6}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
move-result-object p6
const/high16 p7, 0x3f800000 # 1.0f
invoke-static {p2, p3}, Landroidx/recyclerview/widget/ItemTouchUIUtilImpl;->findMaxElevation(Landroidx/recyclerview/widget/RecyclerView;Landroid/view/View;)F
move-result p2
add-float/2addr p2, p7
invoke-static {p3, p2}, Landroidx/core/view/ViewCompat;->setElevation(Landroid/view/View;F)V
invoke-virtual {p3, p1, p6}, Landroid/view/View;->setTag(ILjava/lang/Object;)V
: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