apkfuckery/com.discord/smali/androidx/recyclerview/widget/SnapHelper$2.smali

101 lines
2.9 KiB
Smali
Raw Normal View History

2019-12-06 03:29:40 +00:00
.class public Landroidx/recyclerview/widget/SnapHelper$2;
2019-07-24 11:27:29 +00:00
.super Landroidx/recyclerview/widget/LinearSmoothScroller;
.source "SnapHelper.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Landroidx/recyclerview/widget/SnapHelper;->createSnapScroller(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)Landroidx/recyclerview/widget/LinearSmoothScroller;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
2019-12-06 03:29:40 +00:00
accessFlags = 0x1
2019-07-24 11:27:29 +00:00
name = null
.end annotation
# instance fields
2019-12-06 03:29:40 +00:00
.field public final synthetic this$0:Landroidx/recyclerview/widget/SnapHelper;
2019-07-24 11:27:29 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public constructor <init>(Landroidx/recyclerview/widget/SnapHelper;Landroid/content/Context;)V
2019-07-24 11:27:29 +00:00
.locals 0
iput-object p1, p0, Landroidx/recyclerview/widget/SnapHelper$2;->this$0:Landroidx/recyclerview/widget/SnapHelper;
invoke-direct {p0, p2}, Landroidx/recyclerview/widget/LinearSmoothScroller;-><init>(Landroid/content/Context;)V
return-void
.end method
# virtual methods
2019-12-06 03:29:40 +00:00
.method public calculateSpeedPerPixel(Landroid/util/DisplayMetrics;)F
2019-07-24 11:27:29 +00:00
.locals 1
iget p1, p1, Landroid/util/DisplayMetrics;->densityDpi:I
int-to-float p1, p1
const/high16 v0, 0x42c80000 # 100.0f
div-float/2addr v0, p1
return v0
.end method
2019-12-06 03:29:40 +00:00
.method public onTargetFound(Landroid/view/View;Landroidx/recyclerview/widget/RecyclerView$State;Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;)V
2019-07-24 11:27:29 +00:00
.locals 2
iget-object p2, p0, Landroidx/recyclerview/widget/SnapHelper$2;->this$0:Landroidx/recyclerview/widget/SnapHelper;
2019-12-06 03:29:40 +00:00
iget-object v0, p2, Landroidx/recyclerview/widget/SnapHelper;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
if-nez v0, :cond_0
2019-07-24 11:27:29 +00:00
return-void
:cond_0
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView;->getLayoutManager()Landroidx/recyclerview/widget/RecyclerView$LayoutManager;
move-result-object v0
invoke-virtual {p2, v0, p1}, Landroidx/recyclerview/widget/SnapHelper;->calculateDistanceToFinalSnap(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;Landroid/view/View;)[I
move-result-object p1
const/4 p2, 0x0
aget p2, p1, p2
const/4 v0, 0x1
aget p1, p1, v0
invoke-static {p2}, Ljava/lang/Math;->abs(I)I
move-result v0
invoke-static {p1}, Ljava/lang/Math;->abs(I)I
move-result v1
invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I
move-result v0
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, v0}, Landroidx/recyclerview/widget/LinearSmoothScroller;->calculateTimeForDeceleration(I)I
2019-07-24 11:27:29 +00:00
move-result v0
if-lez v0, :cond_1
2019-12-06 03:29:40 +00:00
iget-object v1, p0, Landroidx/recyclerview/widget/LinearSmoothScroller;->mDecelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;
2019-07-24 11:27:29 +00:00
invoke-virtual {p3, p2, p1, v0, v1}, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->update(IIILandroid/view/animation/Interpolator;)V
:cond_1
return-void
.end method