Weather/smali_classes2/com/moji/mjweather/weather/view/HomePageRelativeLayout.smali
2021-05-10 10:13:34 +02:00

738 lines
20 KiB
Smali

.class public Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;
.super Landroid/widget/RelativeLayout;
.source "HomePageRelativeLayout.java"
# interfaces
.implements Landroid/animation/ValueAnimator$AnimatorUpdateListener;
.implements Landroid/support/v4/view/NestedScrollingParent;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/moji/mjweather/weather/view/HomePageRelativeLayout$MyAnimatorListener;
}
.end annotation
# instance fields
.field private a:Landroid/support/v4/view/NestedScrollingParentHelper;
.field private b:Landroid/animation/ValueAnimator;
.field private c:Landroid/animation/ValueAnimator;
.field private d:Landroid/widget/ListView;
.field private final e:I
.field private f:Z
.field private g:Z
.field private h:Z
.field private i:I
.field private j:Z
.field private k:Z
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 1
const/4 v0, 0x0
.line 39
invoke-direct {p0, p1, p2, v0}, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.locals 0
.line 43
invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
const/4 p1, 0x0
.line 25
iput-object p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->d:Landroid/widget/ListView;
const/4 p1, 0x0
.line 27
iput-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->f:Z
.line 28
iput-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->g:Z
.line 29
iput-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->h:Z
const/4 p2, -0x1
.line 30
iput p2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->i:I
.line 31
iput-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->j:Z
.line 32
iput-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->k:Z
.line 44
invoke-virtual {p0}, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->getResources()Landroid/content/res/Resources;
move-result-object p1
const p2, 0x7f0700c1
invoke-virtual {p1, p2}, Landroid/content/res/Resources;->getDimension(I)F
move-result p1
invoke-static {p1}, Ljava/lang/Math;->round(F)I
move-result p1
iput p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->e:I
.line 45
new-instance p1, Landroid/support/v4/view/NestedScrollingParentHelper;
invoke-direct {p1, p0}, Landroid/support/v4/view/NestedScrollingParentHelper;-><init>(Landroid/view/ViewGroup;)V
iput-object p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->a:Landroid/support/v4/view/NestedScrollingParentHelper;
.line 46
invoke-direct {p0}, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->a()V
return-void
.end method
.method static synthetic a(Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;I)I
.locals 0
.line 20
iput p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->i:I
return p1
.end method
.method static synthetic a(Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;)Landroid/animation/ValueAnimator;
.locals 0
.line 20
iget-object p0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
return-object p0
.end method
.method private a()V
.locals 8
.line 50
new-instance v0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout$MyAnimatorListener;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout$MyAnimatorListener;-><init>(Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;Lcom/moji/mjweather/weather/view/HomePageRelativeLayout$1;)V
const/4 v1, 0x2
.line 51
new-array v2, v1, [I
iget v3, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->e:I
const/4 v4, 0x0
aput v3, v2, v4
const/4 v3, 0x1
aput v4, v2, v3
invoke-static {v2}, Landroid/animation/ValueAnimator;->ofInt([I)Landroid/animation/ValueAnimator;
move-result-object v2
iput-object v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
.line 52
iget-object v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
invoke-virtual {v2, p0}, Landroid/animation/ValueAnimator;->setTarget(Ljava/lang/Object;)V
.line 53
iget-object v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
const-wide/16 v5, 0xe6
invoke-virtual {v2, v5, v6}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
.line 54
iget-object v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
new-instance v7, Landroid/view/animation/LinearInterpolator;
invoke-direct {v7}, Landroid/view/animation/LinearInterpolator;-><init>()V
invoke-virtual {v2, v7}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
.line 55
iget-object v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
invoke-virtual {v2, p0}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
.line 56
iget-object v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
invoke-virtual {v2, v0}, Landroid/animation/ValueAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
.line 58
new-array v1, v1, [I
aput v4, v1, v4
iget v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->e:I
aput v2, v1, v3
invoke-static {v1}, Landroid/animation/ValueAnimator;->ofInt([I)Landroid/animation/ValueAnimator;
move-result-object v1
iput-object v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->c:Landroid/animation/ValueAnimator;
.line 59
iget-object v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
invoke-virtual {v1, p0}, Landroid/animation/ValueAnimator;->setTarget(Ljava/lang/Object;)V
.line 60
iget-object v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->c:Landroid/animation/ValueAnimator;
invoke-virtual {v1, v5, v6}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
.line 61
iget-object v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->c:Landroid/animation/ValueAnimator;
new-instance v2, Landroid/view/animation/LinearInterpolator;
invoke-direct {v2}, Landroid/view/animation/LinearInterpolator;-><init>()V
invoke-virtual {v1, v2}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
.line 62
iget-object v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->c:Landroid/animation/ValueAnimator;
invoke-virtual {v1, p0}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
.line 63
iget-object v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->c:Landroid/animation/ValueAnimator;
invoke-virtual {v1, v0}, Landroid/animation/ValueAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
return-void
.end method
.method static synthetic a(Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;Z)Z
.locals 0
.line 20
iput-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->k:Z
return p1
.end method
.method static synthetic b(Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;)Z
.locals 0
.line 20
iget-boolean p0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->j:Z
return p0
.end method
.method static synthetic b(Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;Z)Z
.locals 0
.line 20
iput-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->h:Z
return p1
.end method
.method static synthetic c(Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;Z)Z
.locals 0
.line 20
iput-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->j:Z
return p1
.end method
# virtual methods
.method public getNestedScrollAxes()I
.locals 1
.line 215
iget-object v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->a:Landroid/support/v4/view/NestedScrollingParentHelper;
invoke-virtual {v0}, Landroid/support/v4/view/NestedScrollingParentHelper;->getNestedScrollAxes()I
move-result v0
return v0
.end method
.method public onAnimationUpdate(Landroid/animation/ValueAnimator;)V
.locals 2
.line 68
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->getAnimatedValue()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/Integer;
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result p1
const/4 v0, 0x0
.line 69
invoke-virtual {p0, v0, p1}, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->scrollTo(II)V
.line 70
iget-boolean v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->f:Z
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->d:Landroid/widget/ListView;
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->isRunning()Z
move-result v0
if-eqz v0, :cond_1
.line 71
iget v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->i:I
const/4 v1, -0x1
if-ne v0, v1, :cond_0
.line 72
iput p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->i:I
.line 75
:cond_0
iput p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->i:I
:cond_1
return-void
.end method
.method public onNestedFling(Landroid/view/View;FFZ)Z
.locals 0
const/4 p1, 0x0
return p1
.end method
.method public onNestedPreFling(Landroid/view/View;FF)Z
.locals 0
const/4 p1, 0x0
return p1
.end method
.method public onNestedPreScroll(Landroid/view/View;II[I)V
.locals 3
.line 174
iget-object v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->d:Landroid/widget/ListView;
if-nez v0, :cond_0
instance-of v0, p1, Lcom/moji/mjweather/weather/view/HomePageNestedScrollingChildHelper$ITopView;
if-eqz v0, :cond_0
.line 175
check-cast p1, Lcom/moji/mjweather/weather/view/HomePageNestedScrollingChildHelper$ITopView;
invoke-interface {p1}, Lcom/moji/mjweather/weather/view/HomePageNestedScrollingChildHelper$ITopView;->getTargetView()Landroid/view/View;
move-result-object p1
check-cast p1, Landroid/widget/ListView;
iput-object p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->d:Landroid/widget/ListView;
.line 177
:cond_0
iget-object p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->d:Landroid/widget/ListView;
if-nez p1, :cond_1
return-void
.line 180
:cond_1
iget-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->k:Z
const/4 v0, 0x1
if-eqz p1, :cond_2
.line 181
aput p3, p4, v0
return-void
.line 184
:cond_2
invoke-static {p3}, Ljava/lang/Math;->abs(I)I
move-result p1
invoke-static {p2}, Ljava/lang/Math;->abs(I)I
move-result p2
if-le p1, p2, :cond_6
iget-object p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->d:Landroid/widget/ListView;
invoke-virtual {p1}, Landroid/widget/ListView;->getFirstVisiblePosition()I
move-result p1
if-nez p1, :cond_6
.line 185
invoke-virtual {p0}, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->getScrollY()I
move-result p1
const/4 p2, 0x0
if-gez p3, :cond_4
if-lez p1, :cond_4
.line 186
iget-object v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->d:Landroid/widget/ListView;
invoke-virtual {v1, p2}, Landroid/widget/ListView;->getChildAt(I)Landroid/view/View;
move-result-object v1
invoke-virtual {v1}, Landroid/view/View;->getTop()I
move-result v1
if-nez v1, :cond_4
.line 187
invoke-static {p3}, Ljava/lang/Math;->abs(I)I
move-result v1
sub-int v1, p1, v1
if-gtz v1, :cond_3
goto :goto_0
:cond_3
invoke-static {p3}, Ljava/lang/Math;->abs(I)I
move-result p1
:goto_0
neg-int p1, p1
.line 188
invoke-virtual {p0, p2, p1}, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->scrollBy(II)V
.line 189
aput p1, p4, v0
.line 190
iput-boolean v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->g:Z
goto :goto_2
:cond_4
if-lez p3, :cond_6
.line 191
iget v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->e:I
if-ge p1, v1, :cond_6
iget-object v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->d:Landroid/widget/ListView;
invoke-virtual {v1, p2}, Landroid/widget/ListView;->getChildAt(I)Landroid/view/View;
move-result-object v1
invoke-virtual {v1}, Landroid/view/View;->getTop()I
move-result v1
if-gtz v1, :cond_6
add-int v1, p1, p3
.line 192
iget v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->e:I
if-gt v1, v2, :cond_5
goto :goto_1
:cond_5
iget p3, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->e:I
sub-int/2addr p3, p1
.line 193
:goto_1
invoke-virtual {p0, p2, p3}, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->scrollBy(II)V
.line 194
aput p3, p4, v0
.line 195
iput-boolean v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->f:Z
:cond_6
:goto_2
return-void
.end method
.method public onNestedScroll(Landroid/view/View;IIII)V
.locals 0
return-void
.end method
.method public onNestedScrollAccepted(Landroid/view/View;Landroid/view/View;I)V
.locals 1
.line 97
iget-object v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->a:Landroid/support/v4/view/NestedScrollingParentHelper;
invoke-virtual {v0, p1, p2, p3}, Landroid/support/v4/view/NestedScrollingParentHelper;->onNestedScrollAccepted(Landroid/view/View;Landroid/view/View;I)V
return-void
.end method
.method public onStartNestedScroll(Landroid/view/View;Landroid/view/View;I)Z
.locals 0
const/4 p1, 0x0
.line 90
iput-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->f:Z
.line 91
iput-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->g:Z
const/4 p1, 0x1
return p1
.end method
.method public onStopNestedScroll(Landroid/view/View;)V
.locals 4
.line 102
iget-object v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->a:Landroid/support/v4/view/NestedScrollingParentHelper;
invoke-virtual {v0, p1}, Landroid/support/v4/view/NestedScrollingParentHelper;->onStopNestedScroll(Landroid/view/View;)V
.line 103
invoke-virtual {p0}, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->getScrollY()I
move-result p1
.line 106
iget v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->e:I
const/4 v1, 0x0
if-lt p1, v0, :cond_1
.line 107
iput-boolean v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->h:Z
.line 108
iget-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->j:Z
if-eqz p1, :cond_0
.line 109
iput-boolean v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->j:Z
:cond_0
return-void
:cond_1
const/4 v0, 0x1
if-gtz p1, :cond_3
.line 115
iput-boolean v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->h:Z
.line 116
iget-boolean p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->j:Z
if-eqz p1, :cond_2
.line 117
iput-boolean v1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->j:Z
:cond_2
return-void
.line 121
:cond_3
iget-boolean v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->g:Z
const/4 v3, 0x2
if-eqz v2, :cond_5
.line 122
iget v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->e:I
div-int/2addr v2, v3
if-le p1, v2, :cond_4
.line 124
iget-object v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->c:Landroid/animation/ValueAnimator;
new-array v3, v3, [I
aput p1, v3, v1
iget p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->e:I
aput p1, v3, v0
invoke-virtual {v2, v3}, Landroid/animation/ValueAnimator;->setIntValues([I)V
.line 125
iput-boolean v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->k:Z
.line 126
iget-object p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->c:Landroid/animation/ValueAnimator;
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->start()V
goto :goto_0
.line 129
:cond_4
iget-object v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
new-array v3, v3, [I
aput p1, v3, v1
aput v1, v3, v0
invoke-virtual {v2, v3}, Landroid/animation/ValueAnimator;->setIntValues([I)V
.line 130
iput-boolean v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->k:Z
.line 131
iget-object p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->start()V
goto :goto_0
.line 133
:cond_5
iget-boolean v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->f:Z
if-eqz v2, :cond_7
.line 134
iget v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->e:I
div-int/2addr v2, v3
if-ge p1, v2, :cond_6
.line 136
iget-object v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
new-array v3, v3, [I
aput p1, v3, v1
aput v1, v3, v0
invoke-virtual {v2, v3}, Landroid/animation/ValueAnimator;->setIntValues([I)V
.line 137
iput-boolean v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->k:Z
.line 138
iget-object p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->b:Landroid/animation/ValueAnimator;
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->start()V
goto :goto_0
.line 141
:cond_6
iget-object v2, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->c:Landroid/animation/ValueAnimator;
new-array v3, v3, [I
aput p1, v3, v1
iget p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->e:I
aput p1, v3, v0
invoke-virtual {v2, v3}, Landroid/animation/ValueAnimator;->setIntValues([I)V
.line 142
iput-boolean v0, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->k:Z
.line 143
iget-object p1, p0, Lcom/moji/mjweather/weather/view/HomePageRelativeLayout;->c:Landroid/animation/ValueAnimator;
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->start()V
:cond_7
:goto_0
return-void
.end method