467 lines
12 KiB
Smali
467 lines
12 KiB
Smali
.class public Lcom/moji/newliveview/base/view/ExpandableLayout;
|
|
.super Landroid/widget/LinearLayout;
|
|
.source "ExpandableLayout.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/newliveview/base/view/ExpandableLayout$OnStatusChangedListener;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private a:Landroid/widget/LinearLayout;
|
|
|
|
.field private b:I
|
|
|
|
.field private c:I
|
|
|
|
.field private d:Z
|
|
|
|
.field private e:Z
|
|
|
|
.field private f:Lcom/moji/newliveview/base/view/ExpandableLayout$OnStatusChangedListener;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 38
|
|
invoke-direct {p0, p1, v0}, Lcom/moji/newliveview/base/view/ExpandableLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 1
|
|
.param p2 # Landroid/util/AttributeSet;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 42
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/moji/newliveview/base/view/ExpandableLayout;-><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
|
|
.param p2 # Landroid/util/AttributeSet;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 46
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 35
|
|
iput-boolean p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->e:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/newliveview/base/view/ExpandableLayout;)Lcom/moji/newliveview/base/view/ExpandableLayout$OnStatusChangedListener;
|
|
.locals 0
|
|
|
|
.line 25
|
|
iget-object p0, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->f:Lcom/moji/newliveview/base/view/ExpandableLayout$OnStatusChangedListener;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/newliveview/base/view/ExpandableLayout;Z)Z
|
|
.locals 0
|
|
|
|
.line 25
|
|
iput-boolean p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->d:Z
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method private c()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x2
|
|
|
|
.line 116
|
|
new-array v0, v0, [I
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->b:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput v1, v0, v2
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->c:I
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput v1, v0, v2
|
|
|
|
invoke-static {v0}, Landroid/animation/ValueAnimator;->ofInt([I)Landroid/animation/ValueAnimator;
|
|
|
|
move-result-object v0
|
|
|
|
const-wide/16 v1, 0xfa
|
|
|
|
.line 117
|
|
invoke-virtual {v0, v1, v2}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
|
|
|
|
.line 118
|
|
new-instance v1, Landroid/view/animation/AccelerateInterpolator;
|
|
|
|
invoke-direct {v1}, Landroid/view/animation/AccelerateInterpolator;-><init>()V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
|
|
|
|
.line 119
|
|
new-instance v1, Lcom/moji/newliveview/base/view/ExpandableLayout$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/newliveview/base/view/ExpandableLayout$1;-><init>(Lcom/moji/newliveview/base/view/ExpandableLayout;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
|
|
|
|
.line 127
|
|
new-instance v1, Lcom/moji/newliveview/base/view/ExpandableLayout$2;
|
|
|
|
invoke-direct {v1, p0, v0}, Lcom/moji/newliveview/base/view/ExpandableLayout$2;-><init>(Lcom/moji/newliveview/base/view/ExpandableLayout;Landroid/animation/ValueAnimator;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
|
|
|
|
.line 143
|
|
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->start()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private d()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x2
|
|
|
|
.line 147
|
|
new-array v0, v0, [I
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->c:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput v1, v0, v2
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->b:I
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput v1, v0, v2
|
|
|
|
invoke-static {v0}, Landroid/animation/ValueAnimator;->ofInt([I)Landroid/animation/ValueAnimator;
|
|
|
|
move-result-object v0
|
|
|
|
const-wide/16 v1, 0xfa
|
|
|
|
.line 148
|
|
invoke-virtual {v0, v1, v2}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
|
|
|
|
.line 149
|
|
new-instance v1, Landroid/view/animation/AccelerateInterpolator;
|
|
|
|
invoke-direct {v1}, Landroid/view/animation/AccelerateInterpolator;-><init>()V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
|
|
|
|
.line 150
|
|
new-instance v1, Lcom/moji/newliveview/base/view/ExpandableLayout$3;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/newliveview/base/view/ExpandableLayout$3;-><init>(Lcom/moji/newliveview/base/view/ExpandableLayout;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
|
|
|
|
.line 158
|
|
new-instance v1, Lcom/moji/newliveview/base/view/ExpandableLayout$4;
|
|
|
|
invoke-direct {v1, p0, v0}, Lcom/moji/newliveview/base/view/ExpandableLayout$4;-><init>(Lcom/moji/newliveview/base/view/ExpandableLayout;Landroid/animation/ValueAnimator;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
|
|
|
|
.line 174
|
|
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->start()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 110
|
|
iput-boolean v0, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->e:Z
|
|
|
|
.line 111
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->requestLayout()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public b()V
|
|
.locals 2
|
|
|
|
.line 183
|
|
iget-boolean v0, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->d:Z
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->a:Landroid/widget/LinearLayout;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 186
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->getMeasuredHeight()I
|
|
|
|
move-result v0
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->c:I
|
|
|
|
if-ge v0, v1, :cond_1
|
|
|
|
.line 187
|
|
invoke-direct {p0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->c()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 189
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->d()V
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method protected onFinishInflate()V
|
|
.locals 1
|
|
|
|
.line 51
|
|
invoke-super {p0}, Landroid/widget/LinearLayout;->onFinishInflate()V
|
|
|
|
.line 52
|
|
sget v0, Lcom/moji/newliveview/R$id;->view_hidden:I
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/LinearLayout;
|
|
|
|
iput-object v0, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->a:Landroid/widget/LinearLayout;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected onMeasure(II)V
|
|
.locals 3
|
|
|
|
.line 57
|
|
invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
|
|
|
|
.line 59
|
|
iget-boolean p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->e:Z
|
|
|
|
const/4 p2, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->a:Landroid/widget/LinearLayout;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->c:I
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->b:I
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
.line 60
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->getMeasuredHeight()I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->c:I
|
|
|
|
.line 61
|
|
iget-object p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->a:Landroid/widget/LinearLayout;
|
|
|
|
invoke-virtual {p1}, Landroid/widget/LinearLayout;->getMeasuredHeight()I
|
|
|
|
move-result p1
|
|
|
|
.line 62
|
|
iget v0, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->c:I
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
if-lez p1, :cond_1
|
|
|
|
.line 63
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v0
|
|
|
|
.line 64
|
|
iget v1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->c:I
|
|
|
|
sub-int/2addr v1, p1
|
|
|
|
iput v1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->b:I
|
|
|
|
iput v1, v0, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
.line 65
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->requestLayout()V
|
|
|
|
.line 66
|
|
iput-boolean p2, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->e:Z
|
|
|
|
.line 70
|
|
:cond_1
|
|
iget-boolean p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->e:Z
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
iget p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->c:I
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
iget p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->b:I
|
|
|
|
if-nez p1, :cond_6
|
|
|
|
.line 71
|
|
:cond_2
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->getChildCount()I
|
|
|
|
move-result p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v0, p1, :cond_3
|
|
|
|
.line 74
|
|
invoke-virtual {p0, v0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
.line 75
|
|
invoke-virtual {v2}, Landroid/view/View;->getMeasuredHeight()I
|
|
|
|
move-result v2
|
|
|
|
add-int/2addr v1, v2
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 77
|
|
:cond_3
|
|
iput v1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->c:I
|
|
|
|
.line 79
|
|
iget-object p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->a:Landroid/widget/LinearLayout;
|
|
|
|
invoke-virtual {p1}, Landroid/widget/LinearLayout;->getChildCount()I
|
|
|
|
move-result p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
if-ge v0, p1, :cond_4
|
|
|
|
.line 82
|
|
iget-object v2, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->a:Landroid/widget/LinearLayout;
|
|
|
|
invoke-virtual {v2, v0}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
.line 83
|
|
invoke-virtual {v2}, Landroid/view/View;->getMeasuredHeight()I
|
|
|
|
move-result v2
|
|
|
|
add-int/2addr v1, v2
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
.line 86
|
|
:cond_4
|
|
iget p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->c:I
|
|
|
|
if-lez p1, :cond_5
|
|
|
|
if-lez v1, :cond_5
|
|
|
|
.line 87
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object p1
|
|
|
|
.line 88
|
|
iget v0, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->c:I
|
|
|
|
sub-int/2addr v0, v1
|
|
|
|
iput v0, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->b:I
|
|
|
|
iput v0, p1, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
.line 89
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/base/view/ExpandableLayout;->requestLayout()V
|
|
|
|
.line 91
|
|
:cond_5
|
|
iput-boolean p2, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->e:Z
|
|
|
|
:cond_6
|
|
return-void
|
|
.end method
|
|
|
|
.method public setOnStatusChangedListener(Lcom/moji/newliveview/base/view/ExpandableLayout$OnStatusChangedListener;)V
|
|
.locals 0
|
|
|
|
.line 200
|
|
iput-object p1, p0, Lcom/moji/newliveview/base/view/ExpandableLayout;->f:Lcom/moji/newliveview/base/view/ExpandableLayout$OnStatusChangedListener;
|
|
|
|
return-void
|
|
.end method
|