LoadingLayout.smali
.class public abstract Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;
.super Landroid/widget/FrameLayout;
.source "LoadingLayout.java"
# interfaces
.implements Lcom/handmark/pulltorefresh/library/ILoadingLayout;
# annotations
.annotation build Landroid/annotation/SuppressLint;
value = {
"ViewConstructor"
}
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/handmark/pulltorefresh/library/internal/LoadingLayout$1;
}
.end annotation
# static fields
.field static final ANIMATION_INTERPOLATOR:Landroid/view/animation/Interpolator;
.field static final LOG_TAG:Ljava/lang/String; = "PullToRefresh-LoadingLayout"
# instance fields
.field protected final mHeaderImage:Landroid/widget/ImageView;
.field protected final mHeaderProgress:Landroid/widget/ProgressBar;
.field protected final mHeaderText:Landroid/widget/TextView;
.field private mInnerLayout:Landroid/widget/LinearLayout;
.field protected final mMode:Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;
.field private mPullLabel:Ljava/lang/CharSequence;
.field private mRefreshingLabel:Ljava/lang/CharSequence;
.field private mReleaseLabel:Ljava/lang/CharSequence;
.field protected final mScrollDirection:Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;
.field private final mSubHeaderText:Landroid/widget/TextView;
.field private mUseIntrinsicAnimation:Z
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 49
new-instance v0, Landroid/view/animation/LinearInterpolator;
invoke-direct {v0}, Landroid/view/animation/LinearInterpolator;-><init>()V
sput-object v0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->ANIMATION_INTERPOLATOR:Landroid/view/animation/Interpolator;
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;Landroid/content/res/TypedArray;)V
.registers 8
.prologue
.line 69
invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
.line 70
iput-object p2, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mMode:Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;
.line 71
iput-object p3, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mScrollDirection:Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;
.line 73
sget-object v0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout$1;->$SwitchMap$com$handmark$pulltorefresh$library$PullToRefreshBase$Orientation:[I
invoke-virtual {p3}, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;->ordinal()I
move-result v1
aget v0, v0, v1
packed-switch v0, :pswitch_data_19a
.line 79
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v0
sget v1, Lcom/handmark/pulltorefresh/library/R$layout;->news_pull_to_refresh_header_vertical:I
invoke-virtual {v0, v1, p0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
.line 83
:goto_1b
sget v0, Lcom/handmark/pulltorefresh/library/R$id;->fl_inner:I
invoke-virtual {p0, v0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->findViewById(I)Landroid/view/View;
move-result-object v0
.line 84
check-cast v0, Landroid/widget/LinearLayout;
iput-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mInnerLayout:Landroid/widget/LinearLayout;
.line 85
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mInnerLayout:Landroid/widget/LinearLayout;
sget v1, Lcom/handmark/pulltorefresh/library/R$id;->pull_to_refresh_text:I
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
.line 86
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mInnerLayout:Landroid/widget/LinearLayout;
sget v1, Lcom/handmark/pulltorefresh/library/R$id;->pull_to_refresh_progress:I
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ProgressBar;
iput-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderProgress:Landroid/widget/ProgressBar;
.line 87
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mInnerLayout:Landroid/widget/LinearLayout;
sget v1, Lcom/handmark/pulltorefresh/library/R$id;->pull_to_refresh_sub_text:I
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
.line 88
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mInnerLayout:Landroid/widget/LinearLayout;
sget v1, Lcom/handmark/pulltorefresh/library/R$id;->pull_to_refresh_image:I
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
iput-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderImage:Landroid/widget/ImageView;
.line 90
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mInnerLayout:Landroid/widget/LinearLayout;
invoke-virtual {v0}, Landroid/widget/LinearLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v0
check-cast v0, Landroid/widget/FrameLayout$LayoutParams;
.line 92
sget-object v1, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout$1;->$SwitchMap$com$handmark$pulltorefresh$library$PullToRefreshBase$Mode:[I
invoke-virtual {p2}, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;->ordinal()I
move-result v2
aget v1, v1, v2
packed-switch v1, :pswitch_data_1a0
.line 104
sget-object v1, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;->VERTICAL:Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;
if-ne p3, v1, :cond_15b
const/16 v1, 0x50
:goto_6e
iput v1, v0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 107
sget v0, Lcom/handmark/pulltorefresh/library/R$string;->pull_to_refresh_pull_label:I
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mPullLabel:Ljava/lang/CharSequence;
.line 108
sget v0, Lcom/handmark/pulltorefresh/library/R$string;->pull_to_refresh_refreshing_label:I
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mRefreshingLabel:Ljava/lang/CharSequence;
.line 109
sget v0, Lcom/handmark/pulltorefresh/library/R$string;->pull_to_refresh_release_label:I
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mReleaseLabel:Ljava/lang/CharSequence;
.line 113
:goto_88
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrHeaderBackground:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result v0
if-eqz v0, :cond_9b
.line 114
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrHeaderBackground:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
.line 115
if-eqz v0, :cond_9b
.line 116
invoke-static {p0, v0}, Lcom/handmark/pulltorefresh/library/internal/ViewCompat;->setBackground(Landroid/view/View;Landroid/graphics/drawable/Drawable;)V
.line 120
:cond_9b
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrHeaderTextAppearance:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result v0
if-eqz v0, :cond_b2
.line 121
new-instance v0, Landroid/util/TypedValue;
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
.line 122
sget v1, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrHeaderTextAppearance:I
invoke-virtual {p4, v1, v0}, Landroid/content/res/TypedArray;->getValue(ILandroid/util/TypedValue;)Z
.line 123
iget v0, v0, Landroid/util/TypedValue;->data:I
invoke-direct {p0, v0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->setTextAppearance(I)V
.line 125
:cond_b2
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrSubHeaderTextAppearance:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result v0
if-eqz v0, :cond_c9
.line 126
new-instance v0, Landroid/util/TypedValue;
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
.line 127
sget v1, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrSubHeaderTextAppearance:I
invoke-virtual {p4, v1, v0}, Landroid/content/res/TypedArray;->getValue(ILandroid/util/TypedValue;)Z
.line 128
iget v0, v0, Landroid/util/TypedValue;->data:I
invoke-direct {p0, v0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->setSubTextAppearance(I)V
.line 132
:cond_c9
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrHeaderTextColor:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result v0
if-eqz v0, :cond_dc
.line 133
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrHeaderTextColor:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->getColorStateList(I)Landroid/content/res/ColorStateList;
move-result-object v0
.line 134
if-eqz v0, :cond_dc
.line 135
invoke-direct {p0, v0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->setTextColor(Landroid/content/res/ColorStateList;)V
.line 138
:cond_dc
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrHeaderSubTextColor:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result v0
if-eqz v0, :cond_ef
.line 139
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrHeaderSubTextColor:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->getColorStateList(I)Landroid/content/res/ColorStateList;
move-result-object v0
.line 140
if-eqz v0, :cond_ef
.line 141
invoke-direct {p0, v0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->setSubTextColor(Landroid/content/res/ColorStateList;)V
.line 146
:cond_ef
const/4 v0, 0x0
.line 147
sget v1, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrDrawable:I
invoke-virtual {p4, v1}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result v1
if-eqz v1, :cond_fe
.line 148
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrDrawable:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
.line 153
:cond_fe
sget-object v1, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout$1;->$SwitchMap$com$handmark$pulltorefresh$library$PullToRefreshBase$Mode:[I
invoke-virtual {p2}, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;->ordinal()I
move-result v2
aget v1, v1, v2
packed-switch v1, :pswitch_data_1a6
.line 156
sget v1, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrDrawableStart:I
invoke-virtual {p4, v1}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result v1
if-eqz v1, :cond_15e
.line 157
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrDrawableStart:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
.line 175
:cond_117
:goto_117
if-nez v0, :cond_125
.line 176
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->getDefaultDrawableResId()I
move-result v1
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
.line 180
:cond_125
invoke-virtual {p0, v0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->setLoadingDrawable(Landroid/graphics/drawable/Drawable;)V
.line 182
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->reset()V
.line 183
return-void
.line 75
:pswitch_12c
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v0
sget v1, Lcom/handmark/pulltorefresh/library/R$layout;->news_pull_to_refresh_header_horizontal:I
invoke-virtual {v0, v1, p0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
goto/16 :goto_1b
.line 94
:pswitch_137
sget-object v1, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;->VERTICAL:Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;
if-ne p3, v1, :cond_159
const/16 v1, 0x30
:goto_13d
iput v1, v0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 97
sget v0, Lcom/handmark/pulltorefresh/library/R$string;->pull_to_refresh_from_bottom_pull_label:I
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mPullLabel:Ljava/lang/CharSequence;
.line 98
sget v0, Lcom/handmark/pulltorefresh/library/R$string;->pull_to_refresh_from_bottom_refreshing_label:I
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mRefreshingLabel:Ljava/lang/CharSequence;
.line 99
sget v0, Lcom/handmark/pulltorefresh/library/R$string;->pull_to_refresh_from_bottom_release_label:I
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mReleaseLabel:Ljava/lang/CharSequence;
goto/16 :goto_88
.line 94
:cond_159
const/4 v1, 0x3
goto :goto_13d
.line 104
:cond_15b
const/4 v1, 0x5
goto/16 :goto_6e
.line 158
:cond_15e
sget v1, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrDrawableTop:I
invoke-virtual {p4, v1}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result v1
if-eqz v1, :cond_117
.line 159
const-string v0, "ptrDrawableTop"
const-string v1, "ptrDrawableStart"
invoke-static {v0, v1}, Lcom/handmark/pulltorefresh/library/internal/Utils;->warnDeprecation(Ljava/lang/String;Ljava/lang/String;)V
.line 160
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrDrawableTop:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
goto :goto_117
.line 165
:pswitch_174
sget v1, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrDrawableEnd:I
invoke-virtual {p4, v1}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result v1
if-eqz v1, :cond_183
.line 166
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrDrawableEnd:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
goto :goto_117
.line 167
:cond_183
sget v1, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrDrawableBottom:I
invoke-virtual {p4, v1}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result v1
if-eqz v1, :cond_117
.line 168
const-string v0, "ptrDrawableBottom"
const-string v1, "ptrDrawableEnd"
invoke-static {v0, v1}, Lcom/handmark/pulltorefresh/library/internal/Utils;->warnDeprecation(Ljava/lang/String;Ljava/lang/String;)V
.line 169
sget v0, Lcom/handmark/pulltorefresh/library/R$styleable;->PullToRefresh_ptrDrawableBottom:I
invoke-virtual {p4, v0}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
goto/16 :goto_117
.line 73
:pswitch_data_19a
.packed-switch 0x1
:pswitch_12c
.end packed-switch
.line 92
:pswitch_data_1a0
.packed-switch 0x1
:pswitch_137
.end packed-switch
.line 153
:pswitch_data_1a6
.packed-switch 0x1
:pswitch_174
.end packed-switch
.end method
.method private setSubHeaderText(Ljava/lang/CharSequence;)V
.registers 4
.prologue
const/16 v1, 0x8
.line 350
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_11
.line 351
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_12
.line 352
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
.line 363
:cond_11
:goto_11
return-void
.line 354
:cond_12
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 358
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {v0}, Landroid/widget/TextView;->getVisibility()I
move-result v0
if-ne v1, v0, :cond_11
.line 359
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
goto :goto_11
.end method
.method private setSubTextAppearance(I)V
.registers 4
.prologue
.line 366
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_d
.line 367
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->getContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v0, v1, p1}, Landroid/widget/TextView;->setTextAppearance(Landroid/content/Context;I)V
.line 369
:cond_d
return-void
.end method
.method private setSubTextColor(Landroid/content/res/ColorStateList;)V
.registers 3
.prologue
.line 372
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_9
.line 373
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setTextColor(Landroid/content/res/ColorStateList;)V
.line 375
:cond_9
return-void
.end method
.method private setTextAppearance(I)V
.registers 4
.prologue
.line 378
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_d
.line 379
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->getContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v0, v1, p1}, Landroid/widget/TextView;->setTextAppearance(Landroid/content/Context;I)V
.line 381
:cond_d
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_1a
.line 382
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->getContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v0, v1, p1}, Landroid/widget/TextView;->setTextAppearance(Landroid/content/Context;I)V
.line 384
:cond_1a
return-void
.end method
.method private setTextColor(Landroid/content/res/ColorStateList;)V
.registers 3
.prologue
.line 387
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_9
.line 388
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setTextColor(Landroid/content/res/ColorStateList;)V
.line 390
:cond_9
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_12
.line 391
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setTextColor(Landroid/content/res/ColorStateList;)V
.line 393
:cond_12
return-void
.end method
# virtual methods
.method public final getContentSize()I
.registers 3
.prologue
.line 198
sget-object v0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout$1;->$SwitchMap$com$handmark$pulltorefresh$library$PullToRefreshBase$Orientation:[I
iget-object v1, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mScrollDirection:Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;
invoke-virtual {v1}, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;->ordinal()I
move-result v1
aget v0, v0, v1
packed-switch v0, :pswitch_data_1c
.line 203
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mInnerLayout:Landroid/widget/LinearLayout;
invoke-virtual {v0}, Landroid/widget/LinearLayout;->getHeight()I
move-result v0
:goto_13
return v0
.line 200
:pswitch_14
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mInnerLayout:Landroid/widget/LinearLayout;
invoke-virtual {v0}, Landroid/widget/LinearLayout;->getWidth()I
move-result v0
goto :goto_13
.line 198
nop
:pswitch_data_1c
.packed-switch 0x1
:pswitch_14
.end packed-switch
.end method
.method protected abstract getDefaultDrawableResId()I
.end method
.method public final hideAllViews()V
.registers 3
.prologue
const/4 v1, 0x4
.line 208
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
invoke-virtual {v0}, Landroid/widget/TextView;->getVisibility()I
move-result v0
if-nez v0, :cond_e
.line 209
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
.line 211
:cond_e
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderProgress:Landroid/widget/ProgressBar;
invoke-virtual {v0}, Landroid/widget/ProgressBar;->getVisibility()I
move-result v0
if-nez v0, :cond_1b
.line 212
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderProgress:Landroid/widget/ProgressBar;
invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V
.line 214
:cond_1b
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderImage:Landroid/widget/ImageView;
invoke-virtual {v0}, Landroid/widget/ImageView;->getVisibility()I
move-result v0
if-nez v0, :cond_28
.line 215
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderImage:Landroid/widget/ImageView;
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V
.line 217
:cond_28
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {v0}, Landroid/widget/TextView;->getVisibility()I
move-result v0
if-nez v0, :cond_35
.line 218
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
.line 220
:cond_35
return-void
.end method
.method protected abstract onLoadingDrawableSet(Landroid/graphics/drawable/Drawable;)V
.end method
.method public final onPull(F)V
.registers 3
.prologue
.line 223
iget-boolean v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mUseIntrinsicAnimation:Z
if-nez v0, :cond_7
.line 224
invoke-virtual {p0, p1}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->onPullImpl(F)V
.line 226
:cond_7
return-void
.end method
.method protected abstract onPullImpl(F)V
.end method
.method public final pullToRefresh()V
.registers 3
.prologue
.line 229
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_b
.line 230
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
iget-object v1, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mPullLabel:Ljava/lang/CharSequence;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 234
:cond_b
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->pullToRefreshImpl()V
.line 235
return-void
.end method
.method protected abstract pullToRefreshImpl()V
.end method
.method public final refreshing()V
.registers 3
.prologue
.line 238
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_b
.line 239
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
iget-object v1, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mRefreshingLabel:Ljava/lang/CharSequence;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 242
:cond_b
iget-boolean v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mUseIntrinsicAnimation:Z
if-eqz v0, :cond_26
.line 243
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderImage:Landroid/widget/ImageView;
invoke-virtual {v0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
move-result-object v0
check-cast v0, Landroid/graphics/drawable/AnimationDrawable;
invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->start()V
.line 249
:goto_1a
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_25
.line 250
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
.line 252
:cond_25
return-void
.line 246
:cond_26
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->refreshingImpl()V
goto :goto_1a
.end method
.method protected abstract refreshingImpl()V
.end method
.method public final releaseToRefresh()V
.registers 3
.prologue
.line 255
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_b
.line 256
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
iget-object v1, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mReleaseLabel:Ljava/lang/CharSequence;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 260
:cond_b
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->releaseToRefreshImpl()V
.line 261
return-void
.end method
.method protected abstract releaseToRefreshImpl()V
.end method
.method public final reset()V
.registers 3
.prologue
const/4 v1, 0x0
.line 264
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_5
.line 267
:cond_5
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderImage:Landroid/widget/ImageView;
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V
.line 269
iget-boolean v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mUseIntrinsicAnimation:Z
if-eqz v0, :cond_31
.line 270
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderImage:Landroid/widget/ImageView;
invoke-virtual {v0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
move-result-object v0
check-cast v0, Landroid/graphics/drawable/AnimationDrawable;
invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->stop()V
.line 276
:goto_19
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
if-eqz v0, :cond_30
.line 277
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {v0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;
move-result-object v0
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_35
.line 278
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
.line 283
:cond_30
:goto_30
return-void
.line 273
:cond_31
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->resetImpl()V
goto :goto_19
.line 280
:cond_35
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
goto :goto_30
.end method
.method protected abstract resetImpl()V
.end method
.method public final setHeight(I)V
.registers 3
.prologue
.line 186
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v0
.line 187
iput p1, v0, Landroid/view/ViewGroup$LayoutParams;->height:I
.line 188
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->requestLayout()V
.line 189
return-void
.end method
.method public setLastUpdatedLabel(Ljava/lang/CharSequence;)V
.registers 2
.prologue
.line 287
invoke-direct {p0, p1}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->setSubHeaderText(Ljava/lang/CharSequence;)V
.line 288
return-void
.end method
.method public final setLoadingDrawable(Landroid/graphics/drawable/Drawable;)V
.registers 3
.prologue
.line 292
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderImage:Landroid/widget/ImageView;
invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
.line 293
instance-of v0, p1, Landroid/graphics/drawable/AnimationDrawable;
iput-boolean v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mUseIntrinsicAnimation:Z
.line 296
invoke-virtual {p0, p1}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->onLoadingDrawableSet(Landroid/graphics/drawable/Drawable;)V
.line 297
return-void
.end method
.method public setPullLabel(Ljava/lang/CharSequence;)V
.registers 2
.prologue
.line 300
iput-object p1, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mPullLabel:Ljava/lang/CharSequence;
.line 301
return-void
.end method
.method public setRefreshingLabel(Ljava/lang/CharSequence;)V
.registers 2
.prologue
.line 304
iput-object p1, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mRefreshingLabel:Ljava/lang/CharSequence;
.line 305
return-void
.end method
.method public setReleaseLabel(Ljava/lang/CharSequence;)V
.registers 2
.prologue
.line 308
iput-object p1, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mReleaseLabel:Ljava/lang/CharSequence;
.line 309
return-void
.end method
.method public setTextTypeface(Landroid/graphics/Typeface;)V
.registers 3
.prologue
.line 313
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;)V
.line 314
return-void
.end method
.method public final setWidth(I)V
.registers 3
.prologue
.line 192
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v0
.line 193
iput p1, v0, Landroid/view/ViewGroup$LayoutParams;->width:I
.line 194
invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->requestLayout()V
.line 195
return-void
.end method
.method public final showInvisibleViews()V
.registers 4
.prologue
const/4 v2, 0x4
const/4 v1, 0x0
.line 317
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
invoke-virtual {v0}, Landroid/widget/TextView;->getVisibility()I
move-result v0
if-ne v2, v0, :cond_f
.line 318
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderText:Landroid/widget/TextView;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
.line 320
:cond_f
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderProgress:Landroid/widget/ProgressBar;
invoke-virtual {v0}, Landroid/widget/ProgressBar;->getVisibility()I
move-result v0
if-ne v2, v0, :cond_1c
.line 321
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderProgress:Landroid/widget/ProgressBar;
invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V
.line 323
:cond_1c
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderImage:Landroid/widget/ImageView;
invoke-virtual {v0}, Landroid/widget/ImageView;->getVisibility()I
move-result v0
if-ne v2, v0, :cond_29
.line 324
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mHeaderImage:Landroid/widget/ImageView;
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V
.line 326
:cond_29
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {v0}, Landroid/widget/TextView;->getVisibility()I
move-result v0
if-ne v2, v0, :cond_36
.line 327
iget-object v0, p0, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->mSubHeaderText:Landroid/widget/TextView;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
.line 329
:cond_36
return-void
.end method