InternalAbstract.smali
.class public abstract Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;
.super Landroid/widget/RelativeLayout;
.source "InternalAbstract.java"
# interfaces
.implements Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
# instance fields
.field protected mSpinnerStyle:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
.field protected mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.field protected mWrappedView:Landroid/view/View;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method protected constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.registers 4
.param p1, "context" # Landroid/content/Context;
.param p2, "attrs" # Landroid/util/AttributeSet;
.param p3, "defStyleAttr" # I
.line 54
invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 55
return-void
.end method
.method protected constructor <init>(Landroid/view/View;)V
.registers 3
.param p1, "wrapped" # Landroid/view/View;
.line 39
instance-of v0, p1, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_8
move-object v0, p1
check-cast v0, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
goto :goto_9
:cond_8
const/4 v0, 0x0
:goto_9
invoke-direct {p0, p1, v0}, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;-><init>(Landroid/view/View;Lcom/scwang/smartrefresh/layout/api/RefreshInternal;)V
.line 40
return-void
.end method
.method protected constructor <init>(Landroid/view/View;Lcom/scwang/smartrefresh/layout/api/RefreshInternal;)V
.registers 6
.param p1, "wrappedView" # Landroid/view/View;
.param p2, "wrappedInternal" # Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 43
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
const/4 v1, 0x0
const/4 v2, 0x0
invoke-direct {p0, v0, v1, v2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 44
iput-object p1, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedView:Landroid/view/View;
.line 45
iput-object p2, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 46
instance-of v0, p0, Lcom/scwang/smartrefresh/layout/impl/RefreshFooterWrapper;
const/high16 v1, -0x40800000 # -1.0f
if-eqz v0, :cond_27
instance-of v0, p2, Lcom/scwang/smartrefresh/layout/api/RefreshHeader;
if-eqz v0, :cond_27
invoke-interface {p2}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getSpinnerStyle()Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
move-result-object v0
sget-object v2, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->MatchLayout:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
if-ne v0, v2, :cond_27
.line 47
invoke-interface {p2}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v0
invoke-virtual {v0, v1}, Landroid/view/View;->setScaleY(F)V
goto :goto_40
.line 48
:cond_27
instance-of v0, p0, Lcom/scwang/smartrefresh/layout/impl/RefreshHeaderWrapper;
if-eqz v0, :cond_40
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
instance-of v2, v0, Lcom/scwang/smartrefresh/layout/api/RefreshFooter;
if-eqz v2, :cond_40
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getSpinnerStyle()Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
move-result-object v0
sget-object v2, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->MatchLayout:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
if-ne v0, v2, :cond_40
.line 49
invoke-interface {p2}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v0
invoke-virtual {v0, v1}, Landroid/view/View;->setScaleY(F)V
.line 51
:cond_40
:goto_40
return-void
.end method
# virtual methods
.method public equals(Ljava/lang/Object;)Z
.registers 7
.param p1, "obj" # Ljava/lang/Object;
.line 59
invoke-super {p0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
const/4 v1, 0x1
if-nez v0, :cond_1e
.line 60
instance-of v0, p1, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
const/4 v2, 0x0
if-eqz v0, :cond_1d
.line 61
move-object v0, p0
.line 62
.local v0, "thisView":Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v3
move-object v4, p1
check-cast v4, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
invoke-interface {v4}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getView()Landroid/view/View;
move-result-object v4
if-ne v3, v4, :cond_1b
goto :goto_1c
:cond_1b
const/4 v1, 0x0
:goto_1c
return v1
.line 64
.end local v0 # "thisView":Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
:cond_1d
return v2
.line 66
:cond_1e
return v1
.end method
.method public getSpinnerStyle()Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
.registers 7
.line 92
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mSpinnerStyle:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
if-eqz v0, :cond_5
.line 93
return-object v0
.line 95
:cond_5
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_10
if-eq v0, p0, :cond_10
.line 96
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->getSpinnerStyle()Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
move-result-object v0
return-object v0
.line 98
:cond_10
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedView:Landroid/view/View;
if-eqz v0, :cond_43
.line 99
invoke-virtual {v0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v0
.line 100
.local v0, "params":Landroid/view/ViewGroup$LayoutParams;
instance-of v1, v0, Lcom/scwang/smartrefresh/layout/SmartRefreshLayout$LayoutParams;
if-eqz v1, :cond_26
.line 101
move-object v1, v0
check-cast v1, Lcom/scwang/smartrefresh/layout/SmartRefreshLayout$LayoutParams;
iget-object v1, v1, Lcom/scwang/smartrefresh/layout/SmartRefreshLayout$LayoutParams;->spinnerStyle:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
iput-object v1, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mSpinnerStyle:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
.line 102
if-eqz v1, :cond_26
.line 103
return-object v1
.line 106
:cond_26
if-eqz v0, :cond_43
.line 107
iget v1, v0, Landroid/view/ViewGroup$LayoutParams;->height:I
if-eqz v1, :cond_31
iget v1, v0, Landroid/view/ViewGroup$LayoutParams;->height:I
const/4 v2, -0x1
if-ne v1, v2, :cond_43
.line 108
:cond_31
sget-object v1, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->values:[Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
array-length v2, v1
const/4 v3, 0x0
:goto_35
if-ge v3, v2, :cond_43
aget-object v4, v1, v3
.line 109
.local v4, "style":Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
iget-boolean v5, v4, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->scale:Z
if-eqz v5, :cond_40
.line 110
iput-object v4, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mSpinnerStyle:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
return-object v4
.line 108
.end local v4 # "style":Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
:cond_40
add-int/lit8 v3, v3, 0x1
goto :goto_35
.line 116
.end local v0 # "params":Landroid/view/ViewGroup$LayoutParams;
:cond_43
sget-object v0, Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;->Translate:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
iput-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mSpinnerStyle:Lcom/scwang/smartrefresh/layout/constant/SpinnerStyle;
return-object v0
.end method
.method public getView()Landroid/view/View;
.registers 2
.line 71
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedView:Landroid/view/View;
if-nez v0, :cond_5
move-object v0, p0
:cond_5
return-object v0
.end method
.method public isSupportHorizontalDrag()Z
.registers 2
.line 133
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_e
if-eq v0, p0, :cond_e
invoke-interface {v0}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->isSupportHorizontalDrag()Z
move-result v0
if-eqz v0, :cond_e
const/4 v0, 0x1
goto :goto_f
:cond_e
const/4 v0, 0x0
:goto_f
return v0
.end method
.method public onFinish(Lcom/scwang/smartrefresh/layout/api/RefreshLayout;Z)I
.registers 4
.param p1, "refreshLayout" # Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
.param p2, "success" # Z
.line 76
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_b
if-eq v0, p0, :cond_b
.line 77
invoke-interface {v0, p1, p2}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->onFinish(Lcom/scwang/smartrefresh/layout/api/RefreshLayout;Z)I
move-result v0
return v0
.line 79
:cond_b
const/4 v0, 0x0
return v0
.end method
.method public onHorizontalDrag(FII)V
.registers 5
.param p1, "percentX" # F
.param p2, "offsetX" # I
.param p3, "offsetMax" # I
.line 138
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_9
if-eq v0, p0, :cond_9
.line 139
invoke-interface {v0, p1, p2, p3}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->onHorizontalDrag(FII)V
.line 141
:cond_9
return-void
.end method
.method public onInitialized(Lcom/scwang/smartrefresh/layout/api/RefreshKernel;II)V
.registers 6
.param p1, "kernel" # Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.param p2, "height" # I
.param p3, "maxDragHeight" # I
.line 121
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_a
if-eq v0, p0, :cond_a
.line 122
invoke-interface {v0, p1, p2, p3}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->onInitialized(Lcom/scwang/smartrefresh/layout/api/RefreshKernel;II)V
goto :goto_1e
.line 123
:cond_a
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedView:Landroid/view/View;
if-eqz v0, :cond_1e
.line 124
invoke-virtual {v0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v0
.line 125
.local v0, "params":Landroid/view/ViewGroup$LayoutParams;
instance-of v1, v0, Lcom/scwang/smartrefresh/layout/SmartRefreshLayout$LayoutParams;
if-eqz v1, :cond_1e
.line 126
move-object v1, v0
check-cast v1, Lcom/scwang/smartrefresh/layout/SmartRefreshLayout$LayoutParams;
iget v1, v1, Lcom/scwang/smartrefresh/layout/SmartRefreshLayout$LayoutParams;->backgroundColor:I
invoke-interface {p1, p0, v1}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->requestDrawBackgroundFor(Lcom/scwang/smartrefresh/layout/api/RefreshInternal;I)Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 129
.end local v0 # "params":Landroid/view/ViewGroup$LayoutParams;
:cond_1e
:goto_1e
return-void
.end method
.method public onMoving(ZFIII)V
.registers 12
.param p1, "isDragging" # Z
.param p2, "percent" # F
.param p3, "offset" # I
.param p4, "height" # I
.param p5, "maxDragHeight" # I
.line 145
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_e
if-eq v0, p0, :cond_e
.line 146
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 148
:cond_e
return-void
.end method
.method public onReleased(Lcom/scwang/smartrefresh/layout/api/RefreshLayout;II)V
.registers 5
.param p1, "refreshLayout" # Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
.param p2, "height" # I
.param p3, "maxDragHeight" # I
.line 152
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_9
if-eq v0, p0, :cond_9
.line 153
invoke-interface {v0, p1, p2, p3}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->onReleased(Lcom/scwang/smartrefresh/layout/api/RefreshLayout;II)V
.line 155
:cond_9
return-void
.end method
.method public onStartAnimator(Lcom/scwang/smartrefresh/layout/api/RefreshLayout;II)V
.registers 5
.param p1, "refreshLayout" # Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
.param p2, "height" # I
.param p3, "maxDragHeight" # I
.line 159
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_9
if-eq v0, p0, :cond_9
.line 160
invoke-interface {v0, p1, p2, p3}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->onStartAnimator(Lcom/scwang/smartrefresh/layout/api/RefreshLayout;II)V
.line 162
:cond_9
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 6
.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 166
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_40
if-eq v0, p0, :cond_40
.line 167
instance-of v1, p0, Lcom/scwang/smartrefresh/layout/impl/RefreshFooterWrapper;
if-eqz v1, :cond_1f
instance-of v0, v0, Lcom/scwang/smartrefresh/layout/api/RefreshHeader;
if-eqz v0, :cond_1f
.line 168
iget-boolean v0, p2, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->isFooter:Z
if-eqz v0, :cond_16
.line 169
invoke-virtual {p2}, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->toHeader()Lcom/scwang/smartrefresh/layout/constant/RefreshState;
move-result-object p2
.line 171
:cond_16
iget-boolean v0, p3, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->isFooter:Z
if-eqz v0, :cond_39
.line 172
invoke-virtual {p3}, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->toHeader()Lcom/scwang/smartrefresh/layout/constant/RefreshState;
move-result-object p3
goto :goto_39
.line 174
:cond_1f
instance-of v0, p0, Lcom/scwang/smartrefresh/layout/impl/RefreshHeaderWrapper;
if-eqz v0, :cond_39
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
instance-of v0, v0, Lcom/scwang/smartrefresh/layout/api/RefreshFooter;
if-eqz v0, :cond_39
.line 175
iget-boolean v0, p2, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->isHeader:Z
if-eqz v0, :cond_31
.line 176
invoke-virtual {p2}, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->toFooter()Lcom/scwang/smartrefresh/layout/constant/RefreshState;
move-result-object p2
.line 178
:cond_31
iget-boolean v0, p3, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->isHeader:Z
if-eqz v0, :cond_39
.line 179
invoke-virtual {p3}, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->toFooter()Lcom/scwang/smartrefresh/layout/constant/RefreshState;
move-result-object p3
.line 182
:cond_39
:goto_39
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
.line 183
.local v0, "listener":Lcom/scwang/smartrefresh/layout/listener/OnStateChangedListener;
if-eqz v0, :cond_40
.line 184
invoke-interface {v0, 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 187
.end local v0 # "listener":Lcom/scwang/smartrefresh/layout/listener/OnStateChangedListener;
:cond_40
return-void
.end method
.method public setNoMoreData(Z)Z
.registers 4
.param p1, "noMoreData" # Z
.line 191
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
instance-of v1, v0, Lcom/scwang/smartrefresh/layout/api/RefreshFooter;
if-eqz v1, :cond_10
check-cast v0, Lcom/scwang/smartrefresh/layout/api/RefreshFooter;
invoke-interface {v0, p1}, Lcom/scwang/smartrefresh/layout/api/RefreshFooter;->setNoMoreData(Z)Z
move-result v0
if-eqz v0, :cond_10
const/4 v0, 0x1
goto :goto_11
:cond_10
const/4 v0, 0x0
:goto_11
return v0
.end method
.method public varargs setPrimaryColors([I)V
.registers 3
.param p1, "colors" # [I
.line 84
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->mWrappedInternal:Lcom/scwang/smartrefresh/layout/api/RefreshInternal;
if-eqz v0, :cond_9
if-eq v0, p0, :cond_9
.line 85
invoke-interface {v0, p1}, Lcom/scwang/smartrefresh/layout/api/RefreshInternal;->setPrimaryColors([I)V
.line 87
:cond_9
return-void
.end method