TwoLevelHeader.smali
.class public Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.super Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;
.source "TwoLevelHeader.java"
# interfaces
.implements Lcom/scwang/smartrefresh/layout/api/RefreshHeader;
# instance fields
.field protected mEnablePullToCloseTwoLevel:Z
.field protected mEnableTwoLevel:Z
.field protected mFloorDuration:I
.field protected mFloorRage:F
.field protected mHeaderHeight:I
.field protected mMaxRage:F
.field protected mPercent:F
.field protected mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.field protected mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.field protected mRefreshRage:F
.field protected mSpinner:I
.field protected mTwoLevelListener:Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
.param p1, "context" # Landroid/content/Context;
.line 53
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 54
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.registers 6
.param p1, "context" # Landroid/content/Context;
.param p2, "attrs" # Landroid/util/AttributeSet;
.line 57
const/4 v0, 0x0
invoke-direct {p0, p1, p2, v0}, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 34
const/4 v0, 0x0
iput v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mPercent:F
.line 35
const/high16 v0, 0x40200000 # 2.5f
iput v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mMaxRage:F
.line 36
const v0, 0x3ff33333 # 1.9f
iput v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorRage:F
.line 37
const/high16 v0, 0x3f800000 # 1.0f
iput v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshRage:F
.line 38
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mEnableTwoLevel:Z
.line 39
iput-boolean v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mEnablePullToCloseTwoLevel:Z
.line 40
const/16 v0, 0x3e8
iput v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorDuration:I
.line 59
sget-object v0, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->FixedBehind:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
iput-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mSpinnerStyle:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
.line 61
sget-object v0, Lcom/scwang/smartrefresh/layout/R$styleable;->TwoLevelHeader:[I
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
move-result-object v0
.line 63
.local v0, "ta":Landroid/content/res/TypedArray;
sget v1, Lcom/scwang/smartrefresh/layout/R$styleable;->TwoLevelHeader_srlMaxRage:I
iget v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mMaxRage:F
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getFloat(IF)F
move-result v1
iput v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mMaxRage:F
.line 64
sget v1, Lcom/scwang/smartrefresh/layout/R$styleable;->TwoLevelHeader_srlFloorRage:I
iget v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorRage:F
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getFloat(IF)F
move-result v1
iput v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorRage:F
.line 65
sget v1, Lcom/scwang/smartrefresh/layout/R$styleable;->TwoLevelHeader_srlRefreshRage:I
iget v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshRage:F
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getFloat(IF)F
move-result v1
iput v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshRage:F
.line 66
sget v1, Lcom/scwang/smartrefresh/layout/R$styleable;->TwoLevelHeader_srlFloorDuration:I
iget v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorDuration:I
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getInt(II)I
move-result v1
iput v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorDuration:I
.line 67
sget v1, Lcom/scwang/smartrefresh/layout/R$styleable;->TwoLevelHeader_srlEnableTwoLevel:I
iget-boolean v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mEnableTwoLevel:Z
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result v1
iput-boolean v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mEnableTwoLevel:Z
.line 68
sget v1, Lcom/scwang/smartrefresh/layout/R$styleable;->TwoLevelHeader_srlEnablePullToCloseTwoLevel:I
iget-boolean v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mEnablePullToCloseTwoLevel:Z
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result v1
iput-boolean v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mEnablePullToCloseTwoLevel:Z
.line 70
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
.line 71
return-void
.end method
# virtual methods
.method public equals(Ljava/lang/Object;)Z
.registers 4
.param p1, "obj" # Ljava/lang/Object;
.line 129
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 130
.local v0, "header":Ljava/lang/Object;
if-eqz v0, :cond_a
invoke-virtual {v0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_10
:cond_a
invoke-super {p0, p1}, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_12
:cond_10
const/4 v1, 0x1
goto :goto_13
:cond_12
const/4 v1, 0x0
:goto_13
return v1
.end method
.method public finishTwoLevel()Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.registers 2
.line 367
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 368
.local v0, "refreshKernel":Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
if-eqz v0, :cond_7
.line 369
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->finishTwoLevel()Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 371
:cond_7
return-object p0
.end method
.method protected moveSpinner(I)V
.registers 10
.param p1, "spinner" # I
.line 216
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 217
.local v0, "refreshHeader":Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
iget v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mSpinner:I
if-eq v1, p1, :cond_3c
if-eqz v0, :cond_3c
.line 218
iput p1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mSpinner:I
.line 219
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getSpinnerStyle()Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
move-result-object v1
.line 220
.local v1, "style":Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
sget-object v2, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->Translate:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
if-ne v1, v2, :cond_1b
.line 221
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
int-to-float v3, p1
invoke-virtual {v2, v3}, Landroid/view/View;->setTranslationY(F)V
goto :goto_3c
.line 222
:cond_1b
iget-boolean v2, v1, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->scale:Z
if-eqz v2, :cond_3c
.line 223
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
.line 224
.local v2, "view":Landroid/view/View;
invoke-virtual {v2}, Landroid/view/View;->getLeft()I
move-result v3
invoke-virtual {v2}, Landroid/view/View;->getTop()I
move-result v4
invoke-virtual {v2}, Landroid/view/View;->getRight()I
move-result v5
invoke-virtual {v2}, Landroid/view/View;->getTop()I
move-result v6
const/4 v7, 0x0
invoke-static {v7, p1}, Ljava/lang/Math;->max(II)I
move-result v7
add-int/2addr v6, v7
invoke-virtual {v2, v3, v4, v5, v6}, Landroid/view/View;->layout(IIII)V
.line 227
.end local v1 # "style":Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
.end local v2 # "view":Landroid/view/View;
:cond_3c
:goto_3c
return-void
.end method
.method protected onAttachedToWindow()V
.registers 4
.line 96
invoke-super {p0}, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->onAttachedToWindow()V
.line 97
sget-object v0, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->MatchLayout:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
iput-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mSpinnerStyle:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
.line 98
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-nez v0, :cond_18
.line 99
move-object v0, p0
.line 100
.local v0, "thisView":Landroid/view/ViewGroup;
new-instance v1, Lcom/scwang/smartrefresh/layout/header/ClassicsHeader;
invoke-virtual {v0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
move-result-object v2
invoke-direct {v1, v2}, Lcom/scwang/smartrefresh/layout/header/ClassicsHeader;-><init>(Landroid/content/Context;)V
invoke-virtual {p0, v1}, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->setRefreshHeader(Lcom/scwang/smartrefresh/layout/api/RefreshHeader;)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.line 102
.end local v0 # "thisView":Landroid/view/ViewGroup;
:cond_18
return-void
.end method
.method protected onDetachedFromWindow()V
.registers 2
.line 106
invoke-super {p0}, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->onDetachedFromWindow()V
.line 107
sget-object v0, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->FixedBehind:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
iput-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mSpinnerStyle:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
.line 108
return-void
.end method
.method protected onFinishInflate()V
.registers 6
.line 77
invoke-super {p0}, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->onFinishInflate()V
.line 78
move-object v0, p0
.line 79
.local v0, "thisGroup":Landroid/view/ViewGroup;
const/4 v1, 0x0
.local v1, "i":I
invoke-virtual {v0}, Landroid/view/ViewGroup;->getChildCount()I
move-result v2
.local v2, "len":I
:goto_9
if-ge v1, v2, :cond_24
.line 80
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
move-result-object v3
.line 81
.local v3, "childAt":Landroid/view/View;
instance-of v4, v3, Lcom/scwang/smartrefresh/layout/api/RefreshHeader;
if-eqz v4, :cond_21
.line 82
move-object v4, v3
check-cast v4, Lcom/scwang/smartrefresh/layout/api/RefreshHeader;
iput-object v4, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 83
move-object v4, v3
check-cast v4, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
iput-object v4, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 84
invoke-virtual {v0, v3}, Landroid/view/ViewGroup;->bringChildToFront(Landroid/view/View;)V
.line 85
goto :goto_24
.line 79
.end local v3 # "childAt":Landroid/view/View;
:cond_21
add-int/lit8 v1, v1, 0x1
goto :goto_9
.line 88
.end local v1 # "i":I
.end local v2 # "len":I
:cond_24
:goto_24
iget-object v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-nez v1, :cond_35
.line 89
move-object v1, p0
.line 90
.local v1, "thisView":Landroid/view/ViewGroup;
new-instance v2, Lcom/scwang/smartrefresh/layout/header/ClassicsHeader;
invoke-virtual {v1}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
move-result-object v3
invoke-direct {v2, v3}, Lcom/scwang/smartrefresh/layout/header/ClassicsHeader;-><init>(Landroid/content/Context;)V
invoke-virtual {p0, v2}, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->setRefreshHeader(Lcom/scwang/smartrefresh/layout/api/RefreshHeader;)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.line 92
.end local v1 # "thisView":Landroid/view/ViewGroup;
:cond_35
return-void
.end method
.method public onInitialized(Lcom/scwang/smartrefresh/layout/api/RefreshKernel;II)V
.registers 8
.param p1, "kernel" # Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.param p2, "height" # I
.param p3, "maxDragHeight" # I
.line 135
move-object v0, p0
.line 136
.local v0, "thisView":Landroid/view/View;
iget-object v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 137
.local v1, "refreshHeader":Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-nez v1, :cond_6
.line 138
return-void
.line 140
:cond_6
const/high16 v2, 0x3f800000 # 1.0f
add-int v3, p3, p2
int-to-float v3, v3
mul-float v3, v3, v2
int-to-float v2, p2
div-float/2addr v3, v2
iget v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mMaxRage:F
cmpl-float v2, v3, v2
if-eqz v2, :cond_29
iget v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mHeaderHeight:I
if-nez v2, :cond_29
.line 141
iput p2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mHeaderHeight:I
.line 142
const/4 v2, 0x0
iput-object v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 143
invoke-interface {p1}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->getRefreshLayout()Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
move-result-object v2
iget v3, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mMaxRage:F
invoke-interface {v2, v3}, Lcom/scwang/smartrefresh/layout/api/RefreshLayout;->setHeaderMaxDragRate(F)Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
.line 144
iput-object v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 146
:cond_29
iget-object v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
if-nez v2, :cond_51
.line 147
invoke-interface {v1}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getSpinnerStyle()Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
move-result-object v2
sget-object v3, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->Translate:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
if-ne v2, v3, :cond_51
.line 148
invoke-virtual {v0}, Landroid/view/View;->isInEditMode()Z
move-result v2
if-nez v2, :cond_51
.line 149
invoke-interface {v1}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
invoke-virtual {v2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v2
check-cast v2, Landroid/view/ViewGroup$MarginLayoutParams;
.line 150
.local v2, "params":Landroid/view/ViewGroup$MarginLayoutParams;
iget v3, v2, Landroid/view/ViewGroup$MarginLayoutParams;->topMargin:I
sub-int/2addr v3, p2
iput v3, v2, Landroid/view/ViewGroup$MarginLayoutParams;->topMargin:I
.line 151
invoke-interface {v1}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v3
invoke-virtual {v3, v2}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
.line 154
.end local v2 # "params":Landroid/view/ViewGroup$MarginLayoutParams;
:cond_51
iput p2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mHeaderHeight:I
.line 155
iput-object p1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 156
iget v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorDuration:I
invoke-interface {p1, v2}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->requestFloorDuration(I)Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 157
iget-boolean v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mEnablePullToCloseTwoLevel:Z
xor-int/lit8 v2, v2, 0x1
invoke-interface {p1, p0, v2}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->requestNeedTouchEventFor(Lcom/scwang/smartrefresh/layout/api/RefreshInternal;Z)Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 158
invoke-interface {v1, p1, p2, p3}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->onInitialized(Lcom/scwang/smartrefresh/layout/api/RefreshKernel;II)V
.line 160
return-void
.end method
.method protected onMeasure(II)V
.registers 7
.param p1, "widthMeasureSpec" # I
.param p2, "heightMeasureSpec" # I
.line 112
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 113
.local v0, "refreshHeader":Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_2b
.line 114
invoke-static {p2}, Landroid/view/View$MeasureSpec;->getMode(I)I
move-result v1
.line 115
.local v1, "mode":I
const/high16 v2, -0x80000000
if-ne v1, v2, :cond_27
.line 116
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
invoke-virtual {v2, p1, p2}, Landroid/view/View;->measure(II)V
.line 117
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
invoke-virtual {v2}, Landroid/view/View;->getMeasuredHeight()I
move-result v2
.line 118
.local v2, "height":I
invoke-super {p0}, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->getSuggestedMinimumWidth()I
move-result v3
invoke-static {v3, p1}, Landroid/view/View;->resolveSize(II)I
move-result v3
invoke-super {p0, v3, v2}, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->setMeasuredDimension(II)V
.line 119
.end local v2 # "height":I
goto :goto_2a
.line 120
:cond_27
invoke-super {p0, p1, p2}, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->onMeasure(II)V
.line 122
.end local v1 # "mode":I
:goto_2a
goto :goto_2e
.line 123
:cond_2b
invoke-super {p0, p1, p2}, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->onMeasure(II)V
.line 125
:goto_2e
return-void
.end method
.method public onMoving(ZFIII)V
.registers 14
.param p1, "isDragging" # Z
.param p2, "percent" # F
.param p3, "offset" # I
.param p4, "height" # I
.param p5, "maxDragHeight" # I
.line 197
invoke-virtual {p0, p3}, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->moveSpinner(I)V
.line 198
iget-object v6, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 199
.local v6, "refreshHeader":Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
iget-object v7, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 200
.local v7, "refreshKernel":Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
if-eqz v6, :cond_12
.line 201
move-object v0, v6
move v1, p1
move v2, p2
move v3, p3
move v4, p4
move v5, p5
invoke-interface/range {v0 .. v5}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->onMoving(ZFIII)V
.line 203
:cond_12
if-eqz p1, :cond_51
.line 204
iget v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mPercent:F
iget v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorRage:F
cmpg-float v0, v0, v1
if-gez v0, :cond_2a
cmpl-float v0, p2, v1
if-ltz v0, :cond_2a
iget-boolean v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mEnableTwoLevel:Z
if-eqz v0, :cond_2a
.line 205
sget-object v0, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->ReleaseToTwoLevel:Lcom/scwang/smartrefresh/layout/constant/RefreshState;
invoke-interface {v7, v0}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->setState(Lcom/scwang/smartrefresh/layout/constant/RefreshState;)Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
goto :goto_4f
.line 206
:cond_2a
iget v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mPercent:F
iget v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorRage:F
cmpl-float v0, v0, v1
if-ltz v0, :cond_3e
iget v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshRage:F
cmpg-float v0, p2, v0
if-gez v0, :cond_3e
.line 207
sget-object v0, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->PullDownToRefresh:Lcom/scwang/smartrefresh/layout/constant/RefreshState;
invoke-interface {v7, v0}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->setState(Lcom/scwang/smartrefresh/layout/constant/RefreshState;)Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
goto :goto_4f
.line 208
:cond_3e
iget v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mPercent:F
iget v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorRage:F
cmpl-float v0, v0, v1
if-ltz v0, :cond_4f
cmpg-float v0, p2, v1
if-gez v0, :cond_4f
.line 209
sget-object v0, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->ReleaseToRefresh:Lcom/scwang/smartrefresh/layout/constant/RefreshState;
invoke-interface {v7, v0}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->setState(Lcom/scwang/smartrefresh/layout/constant/RefreshState;)Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 211
:cond_4f
:goto_4f
iput p2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mPercent:F
.line 213
:cond_51
return-void
.end method
.method public onStateChanged(Lcom/scwang/smartrefresh/layout/api/RefreshLayout;Lcom/scwang/smartrefresh/layout/constant/RefreshState;Lcom/scwang/smartrefresh/layout/constant/RefreshState;)V
.registers 11
.param p1, "refreshLayout" # Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
.param p2, "oldState" # Lcom/scwang/smartrefresh/layout/constant/RefreshState;
.param p3, "newState" # Lcom/scwang/smartrefresh/layout/constant/RefreshState;
.line 164
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 165
.local v0, "refreshHeader":Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_80
.line 166
iget-object v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 167
.local v1, "listener":Lcom/scwang/smartrefresh/layout/listener/OnStateChangedListener;
invoke-interface {v1, p1, p2, p3}, Lcom/scwang/smartrefresh/layout/listener/OnStateChangedListener;->onStateChanged(Lcom/scwang/smartrefresh/layout/api/RefreshLayout;Lcom/scwang/smartrefresh/layout/constant/RefreshState;Lcom/scwang/smartrefresh/layout/constant/RefreshState;)V
.line 168
sget-object v2, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader$1;->$SwitchMap$com$scwang$smartrefresh$layout$constant$RefreshState:[I
invoke-virtual {p3}, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->ordinal()I
move-result v3
aget v2, v2, v3
const/4 v3, 0x0
const/4 v4, 0x1
if-eq v2, v4, :cond_53
const/4 v4, 0x3
const/high16 v5, 0x3f800000 # 1.0f
if-eq v2, v4, :cond_38
const/4 v4, 0x4
if-eq v2, v4, :cond_1e
goto :goto_80
.line 187
:cond_1e
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
invoke-virtual {v2}, Landroid/view/View;->getAlpha()F
move-result v2
cmpl-float v2, v2, v3
if-nez v2, :cond_80
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
if-eq v2, p0, :cond_80
.line 188
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
invoke-virtual {v2, v5}, Landroid/view/View;->setAlpha(F)V
goto :goto_80
.line 182
:cond_38
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
if-eq v2, p0, :cond_80
.line 183
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
invoke-virtual {v2}, Landroid/view/View;->animate()Landroid/view/ViewPropertyAnimator;
move-result-object v2
invoke-virtual {v2, v5}, Landroid/view/ViewPropertyAnimator;->alpha(F)Landroid/view/ViewPropertyAnimator;
move-result-object v2
iget v3, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorDuration:I
div-int/lit8 v3, v3, 0x2
int-to-long v3, v3
invoke-virtual {v2, v3, v4}, Landroid/view/ViewPropertyAnimator;->setDuration(J)Landroid/view/ViewPropertyAnimator;
goto :goto_80
.line 170
:cond_53
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
if-eq v2, p0, :cond_6d
.line 171
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
invoke-virtual {v2}, Landroid/view/View;->animate()Landroid/view/ViewPropertyAnimator;
move-result-object v2
invoke-virtual {v2, v3}, Landroid/view/ViewPropertyAnimator;->alpha(F)Landroid/view/ViewPropertyAnimator;
move-result-object v2
iget v3, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorDuration:I
div-int/lit8 v3, v3, 0x2
int-to-long v5, v3
invoke-virtual {v2, v5, v6}, Landroid/view/ViewPropertyAnimator;->setDuration(J)Landroid/view/ViewPropertyAnimator;
.line 173
:cond_6d
iget-object v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 174
.local v2, "refreshKernel":Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
if-eqz v2, :cond_80
.line 175
iget-object v3, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mTwoLevelListener:Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;
.line 176
.local v3, "twoLevelListener":Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;
if-eqz v3, :cond_7d
invoke-interface {v3, p1}, Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;->onTwoLevel(Lcom/scwang/smartrefresh/layout/api/RefreshLayout;)Z
move-result v5
if-eqz v5, :cond_7c
goto :goto_7d
:cond_7c
const/4 v4, 0x0
:cond_7d
:goto_7d
invoke-interface {v2, v4}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->startTwoLevel(Z)Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 193
.end local v1 # "listener":Lcom/scwang/smartrefresh/layout/listener/OnStateChangedListener;
.end local v2 # "refreshKernel":Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.end local v3 # "twoLevelListener":Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;
:cond_80
:goto_80
return-void
.end method
.method public openTwoLevel(Z)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.registers 5
.param p1, "widthOnTwoLevelListener" # Z
.line 381
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 382
.local v0, "refreshKernel":Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
if-eqz v0, :cond_1b
.line 383
iget-object v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mTwoLevelListener:Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;
.line 384
.local v1, "twoLevelListener":Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;
if-eqz p1, :cond_17
if-eqz v1, :cond_17
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->getRefreshLayout()Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
move-result-object v2
invoke-interface {v1, v2}, Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;->onTwoLevel(Lcom/scwang/smartrefresh/layout/api/RefreshLayout;)Z
move-result v2
if-eqz v2, :cond_15
goto :goto_17
:cond_15
const/4 v2, 0x0
goto :goto_18
:cond_17
:goto_17
const/4 v2, 0x1
:goto_18
invoke-interface {v0, v2}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->startTwoLevel(Z)Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 386
.end local v1 # "twoLevelListener":Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;
:cond_1b
return-object p0
.end method
.method public setEnablePullToCloseTwoLevel(Z)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.registers 4
.param p1, "enabled" # Z
.line 304
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 305
.local v0, "refreshKernel":Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
iput-boolean p1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mEnablePullToCloseTwoLevel:Z
.line 306
if-eqz v0, :cond_b
.line 307
xor-int/lit8 v1, p1, 0x1
invoke-interface {v0, p0, v1}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->requestNeedTouchEventFor(Lcom/scwang/smartrefresh/layout/api/RefreshInternal;Z)Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 309
:cond_b
return-object p0
.end method
.method public setEnableTwoLevel(Z)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.registers 2
.param p1, "enabled" # Z
.line 338
iput-boolean p1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mEnableTwoLevel:Z
.line 339
return-object p0
.end method
.method public setFloorDuration(I)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.registers 2
.param p1, "duration" # I
.line 348
iput p1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorDuration:I
.line 349
return-object p0
.end method
.method public setFloorRage(F)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.registers 2
.param p1, "rate" # F
.line 318
iput p1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mFloorRage:F
.line 319
return-object p0
.end method
.method public setMaxRage(F)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.registers 5
.param p1, "rate" # F
.line 287
iget v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mMaxRage:F
cmpl-float v0, v0, p1
if-eqz v0, :cond_18
.line 288
iput p1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mMaxRage:F
.line 289
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 290
.local v0, "refreshKernel":Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
if-eqz v0, :cond_18
.line 291
const/4 v1, 0x0
iput v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mHeaderHeight:I
.line 292
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->getRefreshLayout()Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
move-result-object v1
iget v2, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mMaxRage:F
invoke-interface {v1, v2}, Lcom/scwang/smartrefresh/layout/api/RefreshLayout;->setHeaderMaxDragRate(F)Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
.line 295
.end local v0 # "refreshKernel":Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
:cond_18
return-object p0
.end method
.method public setOnTwoLevelListener(Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.registers 2
.param p1, "listener" # Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;
.line 358
iput-object p1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mTwoLevelListener:Lcom/scwang/smartrefresh/layout/api/OnTwoLevelListener;
.line 359
return-object p0
.end method
.method public setRefreshHeader(Lcom/scwang/smartrefresh/layout/api/RefreshHeader;)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.registers 4
.param p1, "header" # Lcom/scwang/smartrefresh/layout/api/RefreshHeader;
.line 252
const/4 v0, -0x1
const/4 v1, -0x2
invoke-virtual {p0, p1, v0, v1}, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->setRefreshHeader(Lcom/scwang/smartrefresh/layout/api/RefreshHeader;II)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
move-result-object v0
return-object v0
.end method
.method public setRefreshHeader(Lcom/scwang/smartrefresh/layout/api/RefreshHeader;II)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.registers 9
.param p1, "header" # Lcom/scwang/smartrefresh/layout/api/RefreshHeader;
.param p2, "width" # I
.param p3, "height" # I
.line 263
move-object v0, p0
.line 264
.local v0, "thisGroup":Landroid/view/ViewGroup;
if-eqz p1, :cond_39
.line 265
iget-object v1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 266
.local v1, "refreshHeader":Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v1, :cond_e
.line 267
invoke-interface {v1}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
invoke-virtual {v0, v2}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
.line 269
:cond_e
move-object v1, p1
.line 270
invoke-interface {v1}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getSpinnerStyle()Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
move-result-object v2
sget-object v3, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->FixedBehind:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
if-ne v2, v3, :cond_25
.line 271
invoke-interface {v1}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
const/4 v3, 0x0
new-instance v4, Landroid/widget/RelativeLayout$LayoutParams;
invoke-direct {v4, p2, p3}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V
invoke-virtual {v0, v2, v3, v4}, Landroid/view/ViewGroup;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
goto :goto_35
.line 273
:cond_25
invoke-interface {v1}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v2
invoke-virtual {v0}, Landroid/view/ViewGroup;->getChildCount()I
move-result v3
new-instance v4, Landroid/widget/RelativeLayout$LayoutParams;
invoke-direct {v4, p2, p3}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V
invoke-virtual {v0, v2, v3, v4}, Landroid/view/ViewGroup;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
.line 275
:goto_35
iput-object p1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshHeader:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 276
iput-object p1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 278
.end local v1 # "refreshHeader":Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
:cond_39
return-object p0
.end method
.method public setRefreshRage(F)Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;
.registers 2
.param p1, "rate" # F
.line 328
iput p1, p0, Lcom/scwang/smartrefresh/layout/header/TwoLevelHeader;->mRefreshRage:F
.line 329
return-object p0
.end method