FalsifyFooter.smali
.class public Lcom/scwang/smartrefresh/layout/footer/FalsifyFooter;
.super Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;
.source "FalsifyFooter.java"
# interfaces
.implements Lcom/scwang/smartrefresh/layout/api/RefreshFooter;
# instance fields
.field private mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
# 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 36
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Lcom/scwang/smartrefresh/layout/footer/FalsifyFooter;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 37
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.registers 4
.param p1, "context" # Landroid/content/Context;
.param p2, "attrs" # Landroid/util/AttributeSet;
.line 40
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 41
return-void
.end method
# virtual methods
.method protected dispatchDraw(Landroid/graphics/Canvas;)V
.registers 16
.param p1, "canvas" # Landroid/graphics/Canvas;
.line 45
invoke-super {p0, p1}, Lcom/scwang/smartrefresh/layout/internal/InternalAbstract;->dispatchDraw(Landroid/graphics/Canvas;)V
.line 46
move-object v0, p0
.line 47
.local v0, "thisView":Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->isInEditMode()Z
move-result v1
if-eqz v1, :cond_b0
.line 48
const/high16 v1, 0x40a00000 # 5.0f
invoke-static {v1}, Lcom/scwang/smartrefresh/layout/util/SmartUtil;->dp2px(F)I
move-result v1
.line 49
.local v1, "d":I
invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v2
.line 51
.local v2, "context":Landroid/content/Context;
new-instance v3, Landroid/graphics/Paint;
invoke-direct {v3}, Landroid/graphics/Paint;-><init>()V
.line 52
.local v3, "paint":Landroid/graphics/Paint;
sget-object v4, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;
invoke-virtual {v3, v4}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
.line 53
const v10, -0x33333334
invoke-virtual {v3, v10}, Landroid/graphics/Paint;->setColor(I)V
.line 54
const/high16 v4, 0x3f800000 # 1.0f
invoke-static {v4}, Lcom/scwang/smartrefresh/layout/util/SmartUtil;->dp2px(F)I
move-result v5
int-to-float v5, v5
invoke-virtual {v3, v5}, Landroid/graphics/Paint;->setStrokeWidth(F)V
.line 55
new-instance v5, Landroid/graphics/DashPathEffect;
const/4 v6, 0x4
new-array v6, v6, [F
int-to-float v7, v1
const/4 v11, 0x0
aput v7, v6, v11
int-to-float v7, v1
const/4 v12, 0x1
aput v7, v6, v12
int-to-float v7, v1
const/4 v13, 0x2
aput v7, v6, v13
const/4 v7, 0x3
int-to-float v8, v1
aput v8, v6, v7
invoke-direct {v5, v6, v4}, Landroid/graphics/DashPathEffect;-><init>([FF)V
invoke-virtual {v3, v5}, Landroid/graphics/Paint;->setPathEffect(Landroid/graphics/PathEffect;)Landroid/graphics/PathEffect;
.line 56
int-to-float v5, v1
int-to-float v6, v1
invoke-virtual {v0}, Landroid/view/View;->getWidth()I
move-result v4
sub-int/2addr v4, v1
int-to-float v7, v4
invoke-virtual {v0}, Landroid/view/View;->getBottom()I
move-result v4
sub-int/2addr v4, v1
int-to-float v8, v4
move-object v4, p1
move-object v9, v3
invoke-virtual/range {v4 .. v9}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V
.line 58
new-instance v4, Landroid/widget/TextView;
invoke-direct {v4, v2}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V
.line 59
.local v4, "textView":Landroid/widget/TextView;
sget v5, Lcom/scwang/smartrefresh/layout/R$string;->srl_component_falsify:I
new-array v6, v13, [Ljava/lang/Object;
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
move-result-object v7
aput-object v7, v6, v11
invoke-virtual {v0}, Landroid/view/View;->getHeight()I
move-result v7
invoke-static {v7}, Lcom/scwang/smartrefresh/layout/util/SmartUtil;->px2dp(I)F
move-result v7
invoke-static {v7}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
move-result-object v7
aput-object v7, v6, v12
invoke-virtual {v2, v5, v6}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 60
invoke-virtual {v4, v10}, Landroid/widget/TextView;->setTextColor(I)V
.line 61
const/16 v5, 0x11
invoke-virtual {v4, v5}, Landroid/widget/TextView;->setGravity(I)V
.line 63
move-object v5, v4
.line 64
.local v5, "view":Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->getWidth()I
move-result v6
const/high16 v7, 0x40000000 # 2.0f
invoke-static {v6, v7}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v6
invoke-virtual {v0}, Landroid/view/View;->getHeight()I
move-result v8
invoke-static {v8, v7}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v7
invoke-virtual {v5, v6, v7}, Landroid/view/View;->measure(II)V
.line 65
invoke-virtual {v0}, Landroid/view/View;->getWidth()I
move-result v6
invoke-virtual {v0}, Landroid/view/View;->getHeight()I
move-result v7
invoke-virtual {v5, v11, v11, v6, v7}, Landroid/view/View;->layout(IIII)V
.line 66
invoke-virtual {v5, p1}, Landroid/view/View;->draw(Landroid/graphics/Canvas;)V
.line 68
.end local v1 # "d":I
.end local v2 # "context":Landroid/content/Context;
.end local v3 # "paint":Landroid/graphics/Paint;
.end local v4 # "textView":Landroid/widget/TextView;
.end local v5 # "view":Landroid/view/View;
:cond_b0
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 74
iput-object p1, p0, Lcom/scwang/smartrefresh/layout/footer/FalsifyFooter;->mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 75
invoke-interface {p1}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->getRefreshLayout()Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
move-result-object v0
const/4 v1, 0x0
invoke-interface {v0, v1}, Lcom/scwang/smartrefresh/layout/api/RefreshLayout;->setEnableAutoLoadMore(Z)Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
.line 76
return-void
.end method
.method public onReleased(Lcom/scwang/smartrefresh/layout/api/RefreshLayout;II)V
.registers 6
.param p1, "layout" # Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
.param p2, "height" # I
.param p3, "maxDragHeight" # I
.line 80
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/footer/FalsifyFooter;->mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
if-eqz v0, :cond_10
.line 81
sget-object v1, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->None:Lcom/scwang/smartrefresh/layout/constant/RefreshState;
invoke-interface {v0, v1}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->setState(Lcom/scwang/smartrefresh/layout/constant/RefreshState;)Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 85
iget-object v0, p0, Lcom/scwang/smartrefresh/layout/footer/FalsifyFooter;->mRefreshKernel:Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
sget-object v1, Lcom/scwang/smartrefresh/layout/constant/RefreshState;->LoadFinish:Lcom/scwang/smartrefresh/layout/constant/RefreshState;
invoke-interface {v0, v1}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->setState(Lcom/scwang/smartrefresh/layout/constant/RefreshState;)Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.line 87
:cond_10
return-void
.end method