apkfuckery/com.discord/smali/androidx/transition/TranslationAnimationCreator.smali

177 lines
4 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class Landroidx/transition/TranslationAnimationCreator;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "TranslationAnimationCreator.java"
2019-02-04 20:08:30 +00:00
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/transition/TranslationAnimationCreator$TransitionPositionListener;
}
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method static createAnimation(Landroid/view/View;Landroidx/transition/TransitionValues;IIFFFFLandroid/animation/TimeInterpolator;)Landroid/animation/Animator;
2019-02-04 20:29:01 +00:00
.locals 14
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-object v0, p0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-object v1, p1
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-virtual {p0}, Landroid/view/View;->getTranslationX()F
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-result v2
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-virtual {p0}, Landroid/view/View;->getTranslationY()F
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-result v3
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
iget-object v4, v1, Landroidx/transition/TransitionValues;->view:Landroid/view/View;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
sget v5, Landroidx/transition/R$id;->transition_position:I
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-virtual {v4, v5}, Landroid/view/View;->getTag(I)Ljava/lang/Object;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-result-object v4
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
check-cast v4, [I
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
const/4 v5, 0x1
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
const/4 v6, 0x0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
if-eqz v4, :cond_0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
aget v7, v4, v6
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
sub-int v7, v7, p2
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
int-to-float v7, v7
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
add-float/2addr v7, v2
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
aget v4, v4, v5
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
sub-int v4, v4, p3
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
int-to-float v4, v4
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
add-float/2addr v4, v3
2019-02-04 20:08:30 +00:00
goto :goto_0
:cond_0
2019-02-04 20:29:01 +00:00
move/from16 v7, p4
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move/from16 v4, p5
2019-02-04 20:08:30 +00:00
:goto_0
2019-02-04 20:29:01 +00:00
sub-float v8, v7, v2
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {v8}, Ljava/lang/Math;->round(F)I
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-result v8
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
add-int v8, p2, v8
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
sub-float v9, v4, v3
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {v9}, Ljava/lang/Math;->round(F)I
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-result v9
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
add-int v9, p3, v9
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-virtual {p0, v7}, Landroid/view/View;->setTranslationX(F)V
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-virtual {p0, v4}, Landroid/view/View;->setTranslationY(F)V
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
cmpl-float v10, v7, p6
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
if-nez v10, :cond_1
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
cmpl-float v10, v4, p7
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
if-nez v10, :cond_1
2019-02-04 20:08:30 +00:00
const/4 v0, 0x0
return-object v0
:cond_1
2019-02-04 20:29:01 +00:00
const/4 v10, 0x2
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
new-array v11, v10, [Landroid/animation/PropertyValuesHolder;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
sget-object v12, Landroid/view/View;->TRANSLATION_X:Landroid/util/Property;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
new-array v13, v10, [F
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
aput v7, v13, v6
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
aput p6, v13, v5
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {v12, v13}, Landroid/animation/PropertyValuesHolder;->ofFloat(Landroid/util/Property;[F)Landroid/animation/PropertyValuesHolder;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-result-object v7
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
aput-object v7, v11, v6
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
sget-object v7, Landroid/view/View;->TRANSLATION_Y:Landroid/util/Property;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
new-array v10, v10, [F
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
aput v4, v10, v6
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
aput p7, v10, v5
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {v7, v10}, Landroid/animation/PropertyValuesHolder;->ofFloat(Landroid/util/Property;[F)Landroid/animation/PropertyValuesHolder;
2019-02-04 20:08:30 +00:00
move-result-object v4
2019-02-04 20:29:01 +00:00
aput-object v4, v11, v5
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {p0, v11}, Landroid/animation/ObjectAnimator;->ofPropertyValuesHolder(Ljava/lang/Object;[Landroid/animation/PropertyValuesHolder;)Landroid/animation/ObjectAnimator;
2019-02-04 20:08:30 +00:00
move-result-object v4
new-instance v5, Landroidx/transition/TranslationAnimationCreator$TransitionPositionListener;
iget-object v1, v1, Landroidx/transition/TransitionValues;->view:Landroid/view/View;
2019-02-04 20:29:01 +00:00
move-object p1, v5
2019-02-04 20:08:30 +00:00
move-object/from16 p2, p0
move-object/from16 p3, v1
2019-02-04 20:29:01 +00:00
move/from16 p4, v8
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move/from16 p5, v9
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move/from16 p6, v2
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move/from16 p7, v3
2019-02-04 20:08:30 +00:00
invoke-direct/range {p1 .. p7}, Landroidx/transition/TranslationAnimationCreator$TransitionPositionListener;-><init>(Landroid/view/View;Landroid/view/View;IIFF)V
invoke-virtual {v4, v5}, Landroid/animation/ObjectAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
invoke-static {v4, v5}, Landroidx/transition/AnimatorUtils;->addPauseListener(Landroid/animation/Animator;Landroid/animation/AnimatorListenerAdapter;)V
move-object/from16 v0, p8
invoke-virtual {v4, v0}, Landroid/animation/ObjectAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
return-object v4
.end method