2019-07-31 00:08:31 +00:00
|
|
|
.class public final Landroidx/dynamicanimation/animation/FlingAnimation;
|
|
|
|
.super Landroidx/dynamicanimation/animation/DynamicAnimation;
|
|
|
|
.source "FlingAnimation.java"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Landroidx/dynamicanimation/animation/DynamicAnimation<",
|
|
|
|
"Landroidx/dynamicanimation/animation/FlingAnimation;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Landroidx/dynamicanimation/animation/FloatValueHolder;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Landroidx/dynamicanimation/animation/DynamicAnimation;-><init>(Landroidx/dynamicanimation/animation/FloatValueHolder;)V
|
|
|
|
|
|
|
|
new-instance p1, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p0}, Landroidx/dynamicanimation/animation/DynamicAnimation;->getValueThreshold()F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->setValueThreshold(F)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Ljava/lang/Object;Landroidx/dynamicanimation/animation/FloatPropertyCompat;)V
|
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"<K:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
">(TK;",
|
|
|
|
"Landroidx/dynamicanimation/animation/FloatPropertyCompat<",
|
|
|
|
"TK;>;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Landroidx/dynamicanimation/animation/DynamicAnimation;-><init>(Ljava/lang/Object;Landroidx/dynamicanimation/animation/FloatPropertyCompat;)V
|
|
|
|
|
|
|
|
new-instance p1, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p0}, Landroidx/dynamicanimation/animation/DynamicAnimation;->getValueThreshold()F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->setValueThreshold(F)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public getAcceleration(FF)F
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1, p2}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->getAcceleration(FF)F
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
return p1
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public getFriction()F
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->getFrictionScalar()F
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public isAtEquilibrium(FF)Z
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget v0, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mMaxValue:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
cmpl-float v0, p1, v0
|
|
|
|
|
|
|
|
if-gez v0, :cond_1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget v0, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mMinValue:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
cmpg-float v0, p1, v0
|
|
|
|
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1, p2}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->isAtEquilibrium(FF)Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_1
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:goto_1
|
2019-07-31 00:08:31 +00:00
|
|
|
return p1
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public setFriction(F)Landroidx/dynamicanimation/animation/FlingAnimation;
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 1
|
2019-12-06 03:29:40 +00:00
|
|
|
.param p1 # F
|
|
|
|
.annotation build Landroidx/annotation/FloatRange;
|
|
|
|
from = 0.0
|
|
|
|
fromInclusive = false
|
|
|
|
.end annotation
|
|
|
|
.end param
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
cmpg-float v0, p1, v0
|
|
|
|
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->setFrictionScalar(F)V
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string v0, "Friction must be positive"
|
|
|
|
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public bridge synthetic setMaxValue(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/dynamicanimation/animation/FlingAnimation;->setMaxValue(F)Landroidx/dynamicanimation/animation/FlingAnimation;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public setMaxValue(F)Landroidx/dynamicanimation/animation/FlingAnimation;
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-super {p0, p1}, Landroidx/dynamicanimation/animation/DynamicAnimation;->setMaxValue(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public bridge synthetic setMinValue(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/dynamicanimation/animation/FlingAnimation;->setMinValue(F)Landroidx/dynamicanimation/animation/FlingAnimation;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public setMinValue(F)Landroidx/dynamicanimation/animation/FlingAnimation;
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-super {p0, p1}, Landroidx/dynamicanimation/animation/DynamicAnimation;->setMinValue(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public bridge synthetic setStartVelocity(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/dynamicanimation/animation/FlingAnimation;->setStartVelocity(F)Landroidx/dynamicanimation/animation/FlingAnimation;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public setStartVelocity(F)Landroidx/dynamicanimation/animation/FlingAnimation;
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-super {p0, p1}, Landroidx/dynamicanimation/animation/DynamicAnimation;->setStartVelocity(F)Landroidx/dynamicanimation/animation/DynamicAnimation;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public setValueThreshold(F)V
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->setValueThreshold(F)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public updateValueAndVelocity(J)Z
|
2019-07-31 00:08:31 +00:00
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/dynamicanimation/animation/FlingAnimation;->mFlingForce:Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget v1, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mValue:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget v2, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mVelocity:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2, p1, p2}, Landroidx/dynamicanimation/animation/FlingAnimation$DragForce;->updateValueAndVelocity(FFJ)Landroidx/dynamicanimation/animation/DynamicAnimation$MassState;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iget p2, p1, Landroidx/dynamicanimation/animation/DynamicAnimation$MassState;->mValue:F
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iput p2, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mValue:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
iget p1, p1, Landroidx/dynamicanimation/animation/DynamicAnimation$MassState;->mVelocity:F
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iput p1, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mVelocity:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget p1, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mValue:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget p2, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mMinValue:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
cmpg-float v1, p1, p2
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-gez v1, :cond_0
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iput p2, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mValue:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:cond_0
|
2019-12-06 03:29:40 +00:00
|
|
|
iget p2, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mMaxValue:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
cmpl-float v1, p1, p2
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-lez v1, :cond_1
|
2019-07-31 00:08:31 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iput p2, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mValue:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:cond_1
|
2019-12-06 03:29:40 +00:00
|
|
|
iget p2, p0, Landroidx/dynamicanimation/animation/DynamicAnimation;->mVelocity:F
|
2019-07-31 00:08:31 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/dynamicanimation/animation/FlingAnimation;->isAtEquilibrium(FF)Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
return p1
|
|
|
|
.end method
|