397 lines
9.8 KiB
Smali
397 lines
9.8 KiB
Smali
.class public Lcom/moji/newliveview/detail/ExpandableLinerLayout;
|
|
.super Landroid/widget/LinearLayout;
|
|
.source "ExpandableLinerLayout.java"
|
|
|
|
|
|
# instance fields
|
|
.field private a:Ljava/lang/String;
|
|
|
|
.field private b:I
|
|
|
|
.field private c:I
|
|
|
|
.field private d:I
|
|
|
|
.field private e:I
|
|
|
|
.field private f:Z
|
|
|
|
.field private g:I
|
|
|
|
.field private h:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
.line 27
|
|
invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V
|
|
|
|
const-string p1, "ExpandableLinerLayout"
|
|
|
|
.line 17
|
|
iput-object p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->a:Ljava/lang/String;
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 18
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->b:I
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 20
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->d:I
|
|
|
|
const/16 p1, 0x1f4
|
|
|
|
.line 24
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->h:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 0
|
|
|
|
.line 31
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
const-string p1, "ExpandableLinerLayout"
|
|
|
|
.line 17
|
|
iput-object p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->a:Ljava/lang/String;
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 18
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->b:I
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 20
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->d:I
|
|
|
|
const/16 p1, 0x1f4
|
|
|
|
.line 24
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->h:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 0
|
|
|
|
.line 35
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
const-string p1, "ExpandableLinerLayout"
|
|
|
|
.line 17
|
|
iput-object p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->a:Ljava/lang/String;
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 18
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->b:I
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 20
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->d:I
|
|
|
|
const/16 p1, 0x1f4
|
|
|
|
.line 24
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->h:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x2
|
|
|
|
.line 64
|
|
new-array v0, v0, [I
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->g:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput v1, v0, v2
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->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
|
|
|
|
.line 65
|
|
iget v1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->h:I
|
|
|
|
int-to-long v1, v1
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
|
|
|
|
.line 66
|
|
new-instance v1, Landroid/view/animation/DecelerateInterpolator;
|
|
|
|
invoke-direct {v1}, Landroid/view/animation/DecelerateInterpolator;-><init>()V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
|
|
|
|
.line 67
|
|
new-instance v1, Lcom/moji/newliveview/detail/ExpandableLinerLayout$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/newliveview/detail/ExpandableLinerLayout$1;-><init>(Lcom/moji/newliveview/detail/ExpandableLinerLayout;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
|
|
|
|
.line 76
|
|
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->start()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public b()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x2
|
|
|
|
.line 80
|
|
new-array v0, v0, [I
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->b:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput v1, v0, v2
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->g:I
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput v1, v0, v2
|
|
|
|
invoke-static {v0}, Landroid/animation/ValueAnimator;->ofInt([I)Landroid/animation/ValueAnimator;
|
|
|
|
move-result-object v0
|
|
|
|
.line 81
|
|
iget v1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->h:I
|
|
|
|
int-to-long v1, v1
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
|
|
|
|
.line 82
|
|
new-instance v1, Landroid/view/animation/DecelerateInterpolator;
|
|
|
|
invoke-direct {v1}, Landroid/view/animation/DecelerateInterpolator;-><init>()V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
|
|
|
|
.line 83
|
|
new-instance v1, Lcom/moji/newliveview/detail/ExpandableLinerLayout$2;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/newliveview/detail/ExpandableLinerLayout$2;-><init>(Lcom/moji/newliveview/detail/ExpandableLinerLayout;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
|
|
|
|
.line 92
|
|
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->start()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public c()Z
|
|
.locals 2
|
|
|
|
.line 96
|
|
iget v0, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->c:I
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->b:I
|
|
|
|
if-le v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method protected onLayout(ZIIII)V
|
|
.locals 0
|
|
|
|
.line 60
|
|
invoke-super/range {p0 .. p5}, Landroid/widget/LinearLayout;->onLayout(ZIIII)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected onMeasure(II)V
|
|
.locals 1
|
|
|
|
.line 40
|
|
invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
|
|
|
|
.line 41
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->getMeasuredHeight()I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->b:I
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 42
|
|
:goto_0
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->getChildCount()I
|
|
|
|
move-result p2
|
|
|
|
if-ge p1, p2, :cond_1
|
|
|
|
.line 43
|
|
invoke-virtual {p0, p1}, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2}, Landroid/view/View;->getMeasuredHeight()I
|
|
|
|
move-result p2
|
|
|
|
iput p2, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->e:I
|
|
|
|
.line 44
|
|
iget p2, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->e:I
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 48
|
|
:cond_1
|
|
:goto_1
|
|
iget p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->e:I
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
iget p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->c:I
|
|
|
|
iget p2, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->b:I
|
|
|
|
if-ge p1, p2, :cond_2
|
|
|
|
.line 49
|
|
iget p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->e:I
|
|
|
|
iget p2, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->d:I
|
|
|
|
mul-int p1, p1, p2
|
|
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->getPaddingBottom()I
|
|
|
|
move-result p2
|
|
|
|
add-int/2addr p1, p2
|
|
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->getPaddingTop()I
|
|
|
|
move-result p2
|
|
|
|
add-int/2addr p1, p2
|
|
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->g:I
|
|
|
|
.line 50
|
|
iget p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->b:I
|
|
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->c:I
|
|
|
|
.line 51
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object p1
|
|
|
|
iget p2, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->g:I
|
|
|
|
iput p2, p1, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
.line 52
|
|
iget-boolean p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->f:Z
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 53
|
|
iget-object p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->a:Ljava/lang/String;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v0, "minHeight :"
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget v0, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->g:I
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, " saveHeight :"
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget v0, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->c:I
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p1, p2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public setDuration(I)V
|
|
.locals 0
|
|
|
|
.line 109
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->h:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setShowMinLines(I)V
|
|
.locals 0
|
|
|
|
.line 104
|
|
iput p1, p0, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->d:I
|
|
|
|
.line 105
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/detail/ExpandableLinerLayout;->requestLayout()V
|
|
|
|
return-void
|
|
.end method
|