2020-11-12 02:11:44 +00:00
|
|
|
.class public Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "RecyclerView.java"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Landroidx/recyclerview/widget/RecyclerView$SmoothScroller;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x9
|
|
|
|
name = "Action"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final UNDEFINED_DURATION:I = -0x80000000
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public mChanged:Z
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public mConsecutiveUpdates:I
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public mDuration:I
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public mDx:I
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public mDy:I
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public mInterpolator:Landroid/view/animation/Interpolator;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public mJumpToPosition:I
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(II)V
|
|
|
|
.locals 2
|
|
|
|
.param p1 # I
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # I
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
const/high16 v0, -0x80000000
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, v0, v1}, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;-><init>(IIILandroid/view/animation/Interpolator;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(III)V
|
|
|
|
.locals 1
|
|
|
|
.param p1 # I
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # I
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, p3, v0}, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;-><init>(IIILandroid/view/animation/Interpolator;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(IIILandroid/view/animation/Interpolator;)V
|
|
|
|
.locals 1
|
|
|
|
.param p1 # I
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # I
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p4 # Landroid/view/animation/Interpolator;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
const/4 v0, -0x1
|
|
|
|
|
|
|
|
iput v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mJumpToPosition:I
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mChanged:Z
|
|
|
|
|
|
|
|
iput v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mConsecutiveUpdates:I
|
|
|
|
|
|
|
|
iput p1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDx:I
|
|
|
|
|
|
|
|
iput p2, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDy:I
|
|
|
|
|
|
|
|
iput p3, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDuration:I
|
|
|
|
|
|
|
|
iput-object p4, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mInterpolator:Landroid/view/animation/Interpolator;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private validate()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mInterpolator:Landroid/view/animation/Interpolator;
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
iget v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDuration:I
|
|
|
|
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
|
|
|
|
const-string v1, "If you provide an interpolator, you must set a positive duration"
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
iget v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDuration:I
|
|
|
|
|
|
|
|
if-lt v0, v1, :cond_2
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
|
|
|
|
const-string v1, "Scroll duration must be a positive number"
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public getDuration()I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDuration:I
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getDx()I
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDx:I
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getDy()I
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDy:I
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getInterpolator()Landroid/view/animation/Interpolator;
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mInterpolator:Landroid/view/animation/Interpolator;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public hasJumpTarget()Z
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mJumpToPosition:I
|
|
|
|
|
|
|
|
if-ltz v0, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public jumpTo(I)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput p1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mJumpToPosition:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public runIfNecessary(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
iget v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mJumpToPosition:I
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-ltz v0, :cond_0
|
|
|
|
|
|
|
|
const/4 v2, -0x1
|
|
|
|
|
|
|
|
iput v2, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mJumpToPosition:I
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/recyclerview/widget/RecyclerView;->jumpToPositionForSmoothScroller(I)V
|
|
|
|
|
|
|
|
iput-boolean v1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mChanged:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-boolean v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mChanged:Z
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->validate()V
|
|
|
|
|
|
|
|
iget-object p1, p1, Landroidx/recyclerview/widget/RecyclerView;->mViewFlinger:Landroidx/recyclerview/widget/RecyclerView$ViewFlinger;
|
|
|
|
|
|
|
|
iget v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDx:I
|
|
|
|
|
|
|
|
iget v2, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDy:I
|
|
|
|
|
|
|
|
iget v3, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDuration:I
|
|
|
|
|
|
|
|
iget-object v4, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mInterpolator:Landroid/view/animation/Interpolator;
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0, v2, v3, v4}, Landroidx/recyclerview/widget/RecyclerView$ViewFlinger;->smoothScrollBy(IIILandroid/view/animation/Interpolator;)V
|
|
|
|
|
|
|
|
iget p1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mConsecutiveUpdates:I
|
|
|
|
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
|
|
|
|
iput p1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mConsecutiveUpdates:I
|
|
|
|
|
|
|
|
const/16 v0, 0xa
|
|
|
|
|
|
|
|
if-le p1, v0, :cond_1
|
|
|
|
|
|
|
|
const-string p1, "RecyclerView"
|
|
|
|
|
|
|
|
const-string v0, "Smooth Scroll action is being updated too frequently. Make sure you are not changing it unless necessary"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iput-boolean v1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mChanged:Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iput v1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mConsecutiveUpdates:I
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setDuration(I)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mChanged:Z
|
|
|
|
|
|
|
|
iput p1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDuration:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setDx(I)V
|
|
|
|
.locals 1
|
|
|
|
.param p1 # I
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mChanged:Z
|
|
|
|
|
|
|
|
iput p1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDx:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setDy(I)V
|
|
|
|
.locals 1
|
|
|
|
.param p1 # I
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mChanged:Z
|
|
|
|
|
|
|
|
iput p1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDy:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setInterpolator(Landroid/view/animation/Interpolator;)V
|
|
|
|
.locals 1
|
|
|
|
.param p1 # Landroid/view/animation/Interpolator;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mChanged:Z
|
|
|
|
|
|
|
|
iput-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mInterpolator:Landroid/view/animation/Interpolator;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public update(IIILandroid/view/animation/Interpolator;)V
|
|
|
|
.locals 0
|
|
|
|
.param p1 # I
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # I
|
|
|
|
.annotation build Landroidx/annotation/Px;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p4 # Landroid/view/animation/Interpolator;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
iput p1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDx:I
|
|
|
|
|
|
|
|
iput p2, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDy:I
|
|
|
|
|
|
|
|
iput p3, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mDuration:I
|
|
|
|
|
|
|
|
iput-object p4, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mInterpolator:Landroid/view/animation/Interpolator;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->mChanged:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|