1898 lines
43 KiB
Smali
1898 lines
43 KiB
Smali
.class public Lcom/moji/pulltorefresh/PullToFreshContainer;
|
|
.super Landroid/widget/FrameLayout;
|
|
.source "PullToFreshContainer.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/moji/pulltorefresh/PullRefresher;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/pulltorefresh/PullToFreshContainer$Flinger;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static a:Ljava/lang/String;
|
|
|
|
|
|
# instance fields
|
|
.field b:J
|
|
|
|
.field c:Z
|
|
|
|
.field private d:I
|
|
|
|
.field private e:I
|
|
|
|
.field private f:Landroid/widget/TextView;
|
|
|
|
.field private g:Landroid/view/View;
|
|
|
|
.field private h:F
|
|
|
|
.field private i:I
|
|
|
|
.field private j:Landroid/view/View;
|
|
|
|
.field private k:Lcom/moji/pulltorefresh/PullRefresher$OnContainerRefreshListener;
|
|
|
|
.field private l:Lcom/moji/pulltorefresh/PullToFreshContainer$Flinger;
|
|
|
|
.field private m:Z
|
|
|
|
.field private n:I
|
|
|
|
.field private o:Ljava/lang/String;
|
|
|
|
.field private p:I
|
|
|
|
.field private q:Lcom/moji/pulltorefresh/SunLoadImageView;
|
|
|
|
.field private r:Lcom/moji/pulltorefresh/CloudLoadImageView;
|
|
|
|
.field private s:Z
|
|
|
|
.field private t:Ljava/util/Date;
|
|
|
|
.field private u:Z
|
|
|
|
.field private v:Z
|
|
|
|
.field private w:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 4
|
|
|
|
.line 80
|
|
invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 31
|
|
iput v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
.line 32
|
|
iput v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 42
|
|
iput-boolean v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->m:Z
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
.line 43
|
|
iput-wide v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->b:J
|
|
|
|
.line 44
|
|
iput-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->c:Z
|
|
|
|
.line 45
|
|
sget v2, Lcom/moji/widget/R$string;->loading:I
|
|
|
|
iput v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->n:I
|
|
|
|
.line 47
|
|
iput v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->p:I
|
|
|
|
.line 51
|
|
iput-boolean v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->s:Z
|
|
|
|
.line 54
|
|
iput-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->u:Z
|
|
|
|
.line 631
|
|
iput-boolean v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->w:Z
|
|
|
|
.line 81
|
|
invoke-direct {p0, p1}, Lcom/moji/pulltorefresh/PullToFreshContainer;->a(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 3
|
|
|
|
.line 75
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
const/4 p2, 0x0
|
|
|
|
.line 31
|
|
iput p2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
.line 32
|
|
iput p2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 42
|
|
iput-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->m:Z
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
.line 43
|
|
iput-wide v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->b:J
|
|
|
|
.line 44
|
|
iput-boolean p2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->c:Z
|
|
|
|
.line 45
|
|
sget v1, Lcom/moji/widget/R$string;->loading:I
|
|
|
|
iput v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->n:I
|
|
|
|
.line 47
|
|
iput p2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->p:I
|
|
|
|
.line 51
|
|
iput-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->s:Z
|
|
|
|
.line 54
|
|
iput-boolean p2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->u:Z
|
|
|
|
.line 631
|
|
iput-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->w:Z
|
|
|
|
.line 76
|
|
invoke-direct {p0, p1}, Lcom/moji/pulltorefresh/PullToFreshContainer;->a(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 2
|
|
|
|
.line 70
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
const/4 p2, 0x0
|
|
|
|
.line 31
|
|
iput p2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
.line 32
|
|
iput p2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
const/4 p3, 0x1
|
|
|
|
.line 42
|
|
iput-boolean p3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->m:Z
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
.line 43
|
|
iput-wide v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->b:J
|
|
|
|
.line 44
|
|
iput-boolean p2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->c:Z
|
|
|
|
.line 45
|
|
sget v0, Lcom/moji/widget/R$string;->loading:I
|
|
|
|
iput v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->n:I
|
|
|
|
.line 47
|
|
iput p2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->p:I
|
|
|
|
.line 51
|
|
iput-boolean p3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->s:Z
|
|
|
|
.line 54
|
|
iput-boolean p2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->u:Z
|
|
|
|
.line 631
|
|
iput-boolean p3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->w:Z
|
|
|
|
.line 71
|
|
invoke-direct {p0, p1}, Lcom/moji/pulltorefresh/PullToFreshContainer;->a(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/pulltorefresh/PullToFreshContainer;)I
|
|
.locals 0
|
|
|
|
.line 28
|
|
iget p0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/pulltorefresh/PullToFreshContainer;I)I
|
|
.locals 0
|
|
|
|
.line 28
|
|
iput p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method private a(Landroid/content/Context;)V
|
|
.locals 4
|
|
|
|
.line 100
|
|
invoke-virtual {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
|
|
|
|
move-result-object v0
|
|
|
|
sget v1, Lcom/moji/widget/R$layout;->view_pull_to_refresh_header:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->g:Landroid/view/View;
|
|
|
|
.line 101
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->g:Landroid/view/View;
|
|
|
|
sget v1, Lcom/moji/widget/R$id;->pull_to_refresh_text:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
iput-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->f:Landroid/widget/TextView;
|
|
|
|
.line 105
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->g:Landroid/view/View;
|
|
|
|
sget v1, Lcom/moji/widget/R$id;->pull_to_refresh_sun:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/pulltorefresh/SunLoadImageView;
|
|
|
|
iput-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->q:Lcom/moji/pulltorefresh/SunLoadImageView;
|
|
|
|
.line 106
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->g:Landroid/view/View;
|
|
|
|
sget v1, Lcom/moji/widget/R$id;->pull_to_refresh_cloud:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/pulltorefresh/CloudLoadImageView;
|
|
|
|
iput-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->r:Lcom/moji/pulltorefresh/CloudLoadImageView;
|
|
|
|
.line 109
|
|
iget-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->m:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 110
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->g:Landroid/view/View;
|
|
|
|
invoke-direct {p0, v0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->a(Landroid/view/View;)V
|
|
|
|
.line 111
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->g:Landroid/view/View;
|
|
|
|
invoke-virtual {v0}, Landroid/view/View;->getMeasuredHeight()I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 112
|
|
iput-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->m:Z
|
|
|
|
.line 115
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->g:Landroid/view/View;
|
|
|
|
new-instance v1, Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
const/4 v2, -0x1
|
|
|
|
const/4 v3, -0x2
|
|
|
|
invoke-direct {v1, v2, v3}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V
|
|
|
|
invoke-virtual {p0, v0, v1}, Lcom/moji/pulltorefresh/PullToFreshContainer;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
.line 116
|
|
new-instance v0, Lcom/moji/pulltorefresh/PullToFreshContainer$Flinger;
|
|
|
|
invoke-direct {v0, p0}, Lcom/moji/pulltorefresh/PullToFreshContainer$Flinger;-><init>(Lcom/moji/pulltorefresh/PullToFreshContainer;)V
|
|
|
|
iput-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->l:Lcom/moji/pulltorefresh/PullToFreshContainer$Flinger;
|
|
|
|
.line 117
|
|
invoke-static {p1}, Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;
|
|
|
|
move-result-object p1
|
|
|
|
.line 118
|
|
invoke-virtual {p1}, Landroid/view/ViewConfiguration;->getScaledTouchSlop()I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->p:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Landroid/view/View;)V
|
|
.locals 3
|
|
|
|
.line 154
|
|
invoke-virtual {p1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 156
|
|
new-instance v0, Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
const/4 v1, -0x1
|
|
|
|
const/4 v2, -0x2
|
|
|
|
invoke-direct {v0, v1, v2}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V
|
|
|
|
.line 159
|
|
:cond_0
|
|
iget v1, v0, Landroid/view/ViewGroup$LayoutParams;->width:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {v2, v2, v1}, Landroid/view/ViewGroup;->getChildMeasureSpec(III)I
|
|
|
|
move-result v1
|
|
|
|
.line 160
|
|
iget v0, v0, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
const/high16 v2, 0x40000000 # 2.0f
|
|
|
|
.line 163
|
|
invoke-static {v0, v2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
|
|
|
move-result v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 165
|
|
:cond_1
|
|
invoke-static {v2, v2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
|
|
|
move-result v0
|
|
|
|
.line 167
|
|
:goto_0
|
|
invoke-virtual {p1, v1, v0}, Landroid/view/View;->measure(II)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
.line 549
|
|
invoke-direct {p0, p1}, Lcom/moji/pulltorefresh/PullToFreshContainer;->setUpdateDate(Ljava/lang/String;)V
|
|
|
|
.line 550
|
|
invoke-direct {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->g()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 551
|
|
iput p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private b(Landroid/view/View;)Z
|
|
.locals 8
|
|
|
|
.line 374
|
|
instance-of v0, p1, Landroid/view/ViewGroup;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v0, :cond_b
|
|
|
|
.line 375
|
|
check-cast p1, Landroid/view/ViewGroup;
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getChildCount()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
if-ge v3, v0, :cond_a
|
|
|
|
.line 377
|
|
invoke-virtual {p1, v3}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v4
|
|
|
|
.line 378
|
|
invoke-virtual {v4}, Landroid/view/View;->getScrollY()I
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
return v2
|
|
|
|
.line 383
|
|
:cond_0
|
|
instance-of v5, v4, Landroid/widget/AdapterView;
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
.line 384
|
|
move-object v5, v4
|
|
|
|
check-cast v5, Landroid/widget/AdapterView;
|
|
|
|
.line 385
|
|
invoke-virtual {v5}, Landroid/widget/AdapterView;->getFirstVisiblePosition()I
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
return v2
|
|
|
|
.line 390
|
|
:cond_1
|
|
invoke-virtual {v5}, Landroid/widget/AdapterView;->getChildCount()I
|
|
|
|
move-result v6
|
|
|
|
if-lez v6, :cond_3
|
|
|
|
.line 391
|
|
invoke-virtual {v5, v2}, Landroid/widget/AdapterView;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Landroid/view/View;->getTop()I
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
.line 393
|
|
invoke-virtual {v5}, Landroid/widget/AdapterView;->getPaddingTop()I
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_2
|
|
|
|
.line 394
|
|
invoke-virtual {v5}, Landroid/widget/AdapterView;->getPaddingTop()I
|
|
|
|
move-result v5
|
|
|
|
if-eq v6, v5, :cond_3
|
|
|
|
return v2
|
|
|
|
:cond_2
|
|
return v2
|
|
|
|
.line 402
|
|
:cond_3
|
|
instance-of v5, v4, Landroid/support/v7/widget/RecyclerView;
|
|
|
|
if-eqz v5, :cond_8
|
|
|
|
.line 403
|
|
check-cast v4, Landroid/support/v7/widget/RecyclerView;
|
|
|
|
.line 404
|
|
invoke-virtual {v4}, Landroid/support/v7/widget/RecyclerView;->getChildCount()I
|
|
|
|
move-result p1
|
|
|
|
.line 405
|
|
invoke-virtual {v4}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v0
|
|
|
|
.line 406
|
|
iget-boolean v3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->v:Z
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
instance-of v3, v0, Landroid/support/v7/widget/LinearLayoutManager;
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
.line 407
|
|
check-cast v0, Landroid/support/v7/widget/LinearLayoutManager;
|
|
|
|
.line 408
|
|
invoke-virtual {v0}, Landroid/support/v7/widget/LinearLayoutManager;->o()I
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
return v2
|
|
|
|
:cond_4
|
|
if-ge p1, v1, :cond_5
|
|
|
|
return v1
|
|
|
|
.line 416
|
|
:cond_5
|
|
invoke-virtual {v4, v2}, Landroid/support/v7/widget/RecyclerView;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
.line 417
|
|
invoke-direct {p0, p1}, Lcom/moji/pulltorefresh/PullToFreshContainer;->b(Landroid/view/View;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_6
|
|
|
|
return v2
|
|
|
|
.line 420
|
|
:cond_6
|
|
invoke-virtual {p1}, Landroid/view/View;->getTop()I
|
|
|
|
move-result p1
|
|
|
|
if-gez p1, :cond_7
|
|
|
|
return v2
|
|
|
|
:cond_7
|
|
return v1
|
|
|
|
.line 428
|
|
:cond_8
|
|
invoke-direct {p0, v4}, Lcom/moji/pulltorefresh/PullToFreshContainer;->b(Landroid/view/View;)Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_9
|
|
|
|
return v2
|
|
|
|
:cond_9
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_a
|
|
return v1
|
|
|
|
.line 433
|
|
:cond_b
|
|
invoke-virtual {p1}, Landroid/view/View;->getScrollY()I
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_c
|
|
|
|
goto :goto_1
|
|
|
|
:cond_c
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
return v1
|
|
.end method
|
|
|
|
.method private f()V
|
|
.locals 3
|
|
|
|
.line 562
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->l:Lcom/moji/pulltorefresh/PullToFreshContainer$Flinger;
|
|
|
|
iget v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
iget v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
sub-int/2addr v1, v2
|
|
|
|
const/16 v2, 0x258
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/moji/pulltorefresh/PullToFreshContainer$Flinger;->a(II)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private g()V
|
|
.locals 3
|
|
|
|
.line 566
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->l:Lcom/moji/pulltorefresh/PullToFreshContainer$Flinger;
|
|
|
|
iget v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
const/16 v2, 0x258
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/moji/pulltorefresh/PullToFreshContainer$Flinger;->a(II)V
|
|
|
|
.line 567
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
invoke-virtual {v0}, Landroid/view/View;->clearAnimation()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private getProgressView()Landroid/view/View;
|
|
.locals 2
|
|
|
|
.line 263
|
|
iget-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->u:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 264
|
|
new-instance v0, Landroid/view/View;
|
|
|
|
invoke-virtual {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Landroid/view/View;-><init>(Landroid/content/Context;)V
|
|
|
|
return-object v0
|
|
|
|
.line 267
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->t:Ljava/util/Date;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 268
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->t:Ljava/util/Date;
|
|
|
|
invoke-static {v0}, Lcom/moji/tool/DateFormatTool;->a(Ljava/util/Date;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 269
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->t:Ljava/util/Date;
|
|
|
|
const-string v1, "HH:mm"
|
|
|
|
invoke-static {v0, v1}, Lcom/moji/tool/DateFormatTool;->a(Ljava/util/Date;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/moji/pulltorefresh/PullToFreshContainer;->a:Ljava/lang/String;
|
|
|
|
goto :goto_0
|
|
|
|
.line 271
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->t:Ljava/util/Date;
|
|
|
|
const-string v1, "MM-dd HH:mm"
|
|
|
|
invoke-static {v0, v1}, Lcom/moji/tool/DateFormatTool;->a(Ljava/util/Date;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/moji/pulltorefresh/PullToFreshContainer;->a:Ljava/lang/String;
|
|
|
|
.line 273
|
|
:cond_2
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->q:Lcom/moji/pulltorefresh/SunLoadImageView;
|
|
|
|
const/16 v1, 0x8
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/pulltorefresh/SunLoadImageView;->setVisibility(I)V
|
|
|
|
.line 274
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->r:Lcom/moji/pulltorefresh/CloudLoadImageView;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/pulltorefresh/CloudLoadImageView;->setVisibility(I)V
|
|
|
|
.line 275
|
|
new-instance v0, Ljava/util/Random;
|
|
|
|
invoke-direct {v0}, Ljava/util/Random;-><init>()V
|
|
|
|
const/4 v1, 0x2
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/Random;->nextInt(I)I
|
|
|
|
move-result v0
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
.line 281
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->q:Lcom/moji/pulltorefresh/SunLoadImageView;
|
|
|
|
return-object v0
|
|
|
|
.line 279
|
|
:pswitch_0
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->r:Lcom/moji/pulltorefresh/CloudLoadImageView;
|
|
|
|
return-object v0
|
|
|
|
.line 277
|
|
:pswitch_1
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->q:Lcom/moji/pulltorefresh/SunLoadImageView;
|
|
|
|
return-object v0
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method private setUpdateDate(Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 558
|
|
:cond_0
|
|
sput-object p1, Lcom/moji/pulltorefresh/PullToFreshContainer;->a:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 184
|
|
invoke-virtual {p0, v0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 185
|
|
invoke-virtual {p0, v2}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v3
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 191
|
|
:cond_0
|
|
iget v4, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
packed-switch v4, :pswitch_data_0
|
|
|
|
goto/16 :goto_1
|
|
|
|
.line 228
|
|
:pswitch_0
|
|
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
.line 229
|
|
iget-object v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
invoke-virtual {v2, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
.line 231
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->f:Landroid/widget/TextView;
|
|
|
|
iget v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->n:I
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(I)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
.line 194
|
|
:pswitch_1
|
|
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
.line 196
|
|
iget-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->u:Z
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
.line 197
|
|
iget-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->s:Z
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
.line 198
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
if-ne v0, v2, :cond_3
|
|
|
|
.line 199
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->o:Ljava/lang/String;
|
|
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 200
|
|
sget-object v0, Lcom/moji/pulltorefresh/PullToFreshContainer;->a:Ljava/lang/String;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 201
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->f:Landroid/widget/TextView;
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
sget v4, Lcom/moji/widget/R$string;->updated:I
|
|
|
|
invoke-static {v4}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
sget-object v4, Lcom/moji/pulltorefresh/PullToFreshContainer;->a:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 202
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->f:Landroid/widget/TextView;
|
|
|
|
sget v2, Lcom/moji/widget/R$string;->refresh_pull_down:I
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(I)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 204
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->f:Landroid/widget/TextView;
|
|
|
|
iget-object v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->o:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 208
|
|
:cond_3
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->f:Landroid/widget/TextView;
|
|
|
|
sget v2, Lcom/moji/widget/R$string;->life_release_refresh:I
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(I)V
|
|
|
|
.line 211
|
|
:cond_4
|
|
:goto_0
|
|
iget-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->s:Z
|
|
|
|
if-nez v0, :cond_6
|
|
|
|
.line 212
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->q:Lcom/moji/pulltorefresh/SunLoadImageView;
|
|
|
|
const/16 v2, 0x8
|
|
|
|
invoke-virtual {v0, v2}, Lcom/moji/pulltorefresh/SunLoadImageView;->setVisibility(I)V
|
|
|
|
.line 213
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->r:Lcom/moji/pulltorefresh/CloudLoadImageView;
|
|
|
|
invoke-virtual {v0, v2}, Lcom/moji/pulltorefresh/CloudLoadImageView;->setVisibility(I)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 216
|
|
:cond_5
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->f:Landroid/widget/TextView;
|
|
|
|
const-string v2, ""
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 240
|
|
:pswitch_2
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
if-nez v0, :cond_6
|
|
|
|
invoke-virtual {v1}, Landroid/view/View;->getVisibility()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_6
|
|
|
|
const/4 v0, 0x4
|
|
|
|
.line 241
|
|
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
.line 247
|
|
:cond_6
|
|
:goto_1
|
|
invoke-virtual {v1}, Landroid/view/View;->getVisibility()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_7
|
|
|
|
.line 248
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
invoke-virtual {v1}, Landroid/view/View;->getTop()I
|
|
|
|
move-result v2
|
|
|
|
sub-int/2addr v0, v2
|
|
|
|
iget v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
sub-int/2addr v0, v2
|
|
|
|
invoke-virtual {v1, v0}, Landroid/view/View;->offsetTopAndBottom(I)V
|
|
|
|
if-eqz v3, :cond_8
|
|
|
|
.line 250
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
invoke-virtual {v3}, Landroid/view/View;->getTop()I
|
|
|
|
move-result v1
|
|
|
|
sub-int/2addr v0, v1
|
|
|
|
invoke-virtual {v3, v0}, Landroid/view/View;->offsetTopAndBottom(I)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_7
|
|
if-eqz v3, :cond_8
|
|
|
|
.line 254
|
|
invoke-virtual {v3}, Landroid/view/View;->requestLayout()V
|
|
|
|
.line 258
|
|
:cond_8
|
|
:goto_2
|
|
invoke-virtual {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->invalidate()V
|
|
|
|
return-void
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public addView(Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
.line 135
|
|
invoke-super {p0, p1}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public addView(Landroid/view/View;I)V
|
|
.locals 0
|
|
|
|
.line 140
|
|
invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
|
|
.locals 0
|
|
|
|
.line 150
|
|
invoke-super {p0, p1, p2, p3}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
|
|
.locals 0
|
|
|
|
.line 145
|
|
invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public b()V
|
|
.locals 2
|
|
|
|
.line 580
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0}, Ljava/util/Date;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->t:Ljava/util/Date;
|
|
|
|
.line 581
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->t:Ljava/util/Date;
|
|
|
|
const-string v1, "MM-dd HH:mm"
|
|
|
|
invoke-static {v0, v1}, Lcom/moji/tool/DateFormatTool;->a(Ljava/util/Date;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->a(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public c()V
|
|
.locals 1
|
|
|
|
.line 586
|
|
invoke-direct {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getProgressView()Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
const/4 v0, 0x3
|
|
|
|
.line 587
|
|
iput v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
.line 588
|
|
invoke-direct {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->f()V
|
|
|
|
.line 589
|
|
invoke-virtual {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->e()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public d()V
|
|
.locals 2
|
|
|
|
.line 593
|
|
invoke-direct {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getProgressView()Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
const/4 v0, 0x3
|
|
|
|
.line 594
|
|
iput v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
.line 595
|
|
invoke-direct {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->f()V
|
|
|
|
.line 596
|
|
iget-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->u:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 599
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public e()V
|
|
.locals 2
|
|
|
|
.line 618
|
|
iget-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->u:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 621
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V
|
|
|
|
.line 622
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->k:Lcom/moji/pulltorefresh/PullRefresher$OnContainerRefreshListener;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 623
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->k:Lcom/moji/pulltorefresh/PullRefresher$OnContainerRefreshListener;
|
|
|
|
invoke-interface {v0}, Lcom/moji/pulltorefresh/PullRefresher$OnContainerRefreshListener;->a()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public getInfoView()Landroid/widget/TextView;
|
|
.locals 1
|
|
|
|
.line 126
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->f:Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getRefreshHeader()Landroid/view/View;
|
|
.locals 1
|
|
|
|
.line 122
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->g:Landroid/view/View;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getStatus()I
|
|
.locals 1
|
|
|
|
.line 603
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
|
|
.locals 8
|
|
|
|
.line 441
|
|
iget-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->w:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
.line 444
|
|
:cond_0
|
|
iget-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->c:Z
|
|
|
|
if-nez v0, :cond_b
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 445
|
|
invoke-virtual {p0, v0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
return v1
|
|
|
|
.line 451
|
|
:cond_1
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
|
|
|
|
move-result v3
|
|
|
|
.line 452
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result p1
|
|
|
|
const/4 v4, 0x3
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
.line 455
|
|
iget v5, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
if-eq v5, v4, :cond_2
|
|
|
|
.line 456
|
|
invoke-direct {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getProgressView()Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_2
|
|
const/4 v5, 0x2
|
|
|
|
if-ne p1, v5, :cond_a
|
|
|
|
.line 458
|
|
iget p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->h:F
|
|
|
|
sub-float p1, v3, p1
|
|
|
|
invoke-static {p1}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result p1
|
|
|
|
float-to-int p1, p1
|
|
|
|
.line 459
|
|
iget v6, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->p:I
|
|
|
|
if-ge p1, v6, :cond_3
|
|
|
|
return v1
|
|
|
|
.line 463
|
|
:cond_3
|
|
invoke-virtual {v2}, Landroid/view/View;->getTop()I
|
|
|
|
move-result p1
|
|
|
|
int-to-float p1, p1
|
|
|
|
.line 464
|
|
iget v6, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->h:F
|
|
|
|
sub-float v6, v3, v6
|
|
|
|
.line 465
|
|
iget v7, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
if-ne v7, v4, :cond_4
|
|
|
|
return v1
|
|
|
|
.line 472
|
|
:cond_4
|
|
iget v4, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
if-nez v4, :cond_8
|
|
|
|
.line 473
|
|
invoke-virtual {v2}, Landroid/view/View;->getScrollY()I
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
return v1
|
|
|
|
.line 478
|
|
:cond_5
|
|
instance-of v4, v2, Landroid/widget/AdapterView;
|
|
|
|
if-eqz v4, :cond_7
|
|
|
|
.line 479
|
|
move-object v4, v2
|
|
|
|
check-cast v4, Landroid/widget/AdapterView;
|
|
|
|
.line 480
|
|
invoke-virtual {v4}, Landroid/widget/AdapterView;->getFirstVisiblePosition()I
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_6
|
|
|
|
return v1
|
|
|
|
.line 485
|
|
:cond_6
|
|
invoke-virtual {v4}, Landroid/widget/AdapterView;->getChildCount()I
|
|
|
|
move-result v7
|
|
|
|
if-lez v7, :cond_7
|
|
|
|
.line 486
|
|
invoke-virtual {v4, v1}, Landroid/widget/AdapterView;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Landroid/view/View;->getTop()I
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_7
|
|
|
|
return v1
|
|
|
|
.line 492
|
|
:cond_7
|
|
invoke-direct {p0, v2}, Lcom/moji/pulltorefresh/PullToFreshContainer;->b(Landroid/view/View;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_8
|
|
|
|
return v1
|
|
|
|
:cond_8
|
|
const v2, 0x3fd9999a # 1.7f
|
|
|
|
div-float/2addr v6, v2
|
|
|
|
add-float/2addr p1, v6
|
|
|
|
const/4 v2, 0x0
|
|
|
|
cmpl-float v2, p1, v2
|
|
|
|
if-lez v2, :cond_9
|
|
|
|
.line 496
|
|
iget v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
int-to-float v2, v2
|
|
|
|
cmpg-float v2, p1, v2
|
|
|
|
if-gez v2, :cond_9
|
|
|
|
.line 497
|
|
iget-object v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
invoke-virtual {v2, v1}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
.line 499
|
|
iput v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
.line 500
|
|
iput-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->c:Z
|
|
|
|
float-to-int p1, p1
|
|
|
|
.line 501
|
|
iput p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
.line 502
|
|
invoke-virtual {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->a()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 503
|
|
:cond_9
|
|
iget v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
int-to-float v2, v2
|
|
|
|
cmpl-float v2, p1, v2
|
|
|
|
if-lez v2, :cond_a
|
|
|
|
.line 504
|
|
iget-object v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
invoke-virtual {v2, v1}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
.line 506
|
|
iput v5, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
.line 507
|
|
iput-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->c:Z
|
|
|
|
float-to-int p1, p1
|
|
|
|
.line 508
|
|
iput p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
.line 509
|
|
invoke-virtual {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->a()V
|
|
|
|
.line 512
|
|
:cond_a
|
|
:goto_0
|
|
iput v3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->h:F
|
|
|
|
.line 514
|
|
:cond_b
|
|
iget-boolean p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->c:Z
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method protected onLayout(ZIIII)V
|
|
.locals 1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 172
|
|
invoke-virtual {p0, p1}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 p3, 0x1
|
|
|
|
.line 173
|
|
invoke-virtual {p0, p3}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object p3
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 175
|
|
iget p4, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
neg-int p4, p4
|
|
|
|
iget p5, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
add-int/2addr p4, p5
|
|
|
|
invoke-virtual {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getMeasuredWidth()I
|
|
|
|
move-result p5
|
|
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
invoke-virtual {p2, p1, p4, p5, v0}, Landroid/view/View;->layout(IIII)V
|
|
|
|
:cond_0
|
|
if-eqz p3, :cond_1
|
|
|
|
.line 179
|
|
iget p2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
invoke-virtual {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getMeasuredWidth()I
|
|
|
|
move-result p4
|
|
|
|
invoke-virtual {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getMeasuredHeight()I
|
|
|
|
move-result p5
|
|
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
add-int/2addr p5, v0
|
|
|
|
invoke-virtual {p3, p1, p2, p4, p5}, Landroid/view/View;->layout(IIII)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
|
|
.locals 7
|
|
|
|
.line 287
|
|
iget-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->w:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
.line 290
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 291
|
|
invoke-virtual {p0, v2}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v3
|
|
|
|
.line 292
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
|
|
|
|
move-result p1
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
return v1
|
|
|
|
:cond_1
|
|
const/4 v4, 0x2
|
|
|
|
const/4 v5, 0x3
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
goto/16 :goto_3
|
|
|
|
.line 358
|
|
:pswitch_0
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
if-ne v0, v5, :cond_2
|
|
|
|
.line 359
|
|
invoke-direct {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->f()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 361
|
|
:cond_2
|
|
invoke-direct {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->g()V
|
|
|
|
.line 362
|
|
iput v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
.line 364
|
|
:goto_0
|
|
iput-boolean v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->c:Z
|
|
|
|
goto/16 :goto_3
|
|
|
|
.line 306
|
|
:pswitch_1
|
|
invoke-virtual {v3}, Landroid/view/View;->getTop()I
|
|
|
|
move-result v0
|
|
|
|
int-to-float v0, v0
|
|
|
|
.line 307
|
|
iget v3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->h:F
|
|
|
|
sub-float v3, p1, v3
|
|
|
|
const v6, 0x3fd9999a # 1.7f
|
|
|
|
div-float/2addr v3, v6
|
|
|
|
add-float/2addr v0, v3
|
|
|
|
float-to-int v0, v0
|
|
|
|
.line 309
|
|
iput v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
.line 312
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
if-eq v0, v5, :cond_5
|
|
|
|
.line 313
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
if-lez v0, :cond_3
|
|
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
iget v3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
if-ge v0, v3, :cond_3
|
|
|
|
.line 315
|
|
iput v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
goto :goto_1
|
|
|
|
.line 316
|
|
:cond_3
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
iget v3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
if-le v0, v3, :cond_4
|
|
|
|
.line 318
|
|
iput v4, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
goto :goto_1
|
|
|
|
.line 319
|
|
:cond_4
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
iget v3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
if-eq v0, v3, :cond_8
|
|
|
|
.line 320
|
|
iput v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
.line 321
|
|
iput v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
goto :goto_1
|
|
|
|
.line 323
|
|
:cond_5
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
if-ne v0, v5, :cond_8
|
|
|
|
.line 324
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
if-lez v0, :cond_6
|
|
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
iget v3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
if-ge v0, v3, :cond_6
|
|
|
|
.line 326
|
|
iput v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
goto :goto_1
|
|
|
|
.line 327
|
|
:cond_6
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
iget v3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
if-le v0, v3, :cond_7
|
|
|
|
.line 329
|
|
iput v4, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
goto :goto_1
|
|
|
|
.line 330
|
|
:cond_7
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
iget v3, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->d:I
|
|
|
|
if-eq v0, v3, :cond_8
|
|
|
|
.line 331
|
|
iput v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->i:I
|
|
|
|
.line 332
|
|
iput v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
.line 335
|
|
:cond_8
|
|
:goto_1
|
|
invoke-virtual {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->a()V
|
|
|
|
goto :goto_3
|
|
|
|
.line 338
|
|
:pswitch_2
|
|
iget-boolean v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->u:Z
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
.line 339
|
|
iput v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
.line 341
|
|
:cond_9
|
|
invoke-virtual {v3}, Landroid/view/View;->getTop()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_a
|
|
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
if-ne v0, v4, :cond_a
|
|
|
|
.line 342
|
|
iput v5, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
.line 343
|
|
invoke-direct {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->f()V
|
|
|
|
.line 344
|
|
invoke-virtual {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->e()V
|
|
|
|
goto :goto_2
|
|
|
|
.line 345
|
|
:cond_a
|
|
iget v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
if-ne v0, v5, :cond_b
|
|
|
|
goto :goto_2
|
|
|
|
.line 352
|
|
:cond_b
|
|
invoke-direct {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->g()V
|
|
|
|
.line 353
|
|
iput v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->e:I
|
|
|
|
.line 355
|
|
:goto_2
|
|
iput-boolean v1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->c:Z
|
|
|
|
goto :goto_3
|
|
|
|
.line 301
|
|
:pswitch_3
|
|
invoke-direct {p0}, Lcom/moji/pulltorefresh/PullToFreshContainer;->getProgressView()Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
.line 302
|
|
iget-object p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->j:Landroid/view/View;
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
.line 303
|
|
iput-boolean v2, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->c:Z
|
|
|
|
return v2
|
|
|
|
.line 368
|
|
:goto_3
|
|
iput p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->h:F
|
|
|
|
return v2
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public setCanScroll(Z)V
|
|
.locals 0
|
|
|
|
.line 634
|
|
iput-boolean p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->w:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCancelPullToRefresh(Z)V
|
|
.locals 0
|
|
|
|
.line 61
|
|
iput-boolean p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->u:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setFeedDetail(Z)V
|
|
.locals 0
|
|
|
|
.line 92
|
|
iput-boolean p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->v:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setOnRefreshListener(Lcom/moji/pulltorefresh/PullRefresher$OnContainerRefreshListener;)V
|
|
.locals 0
|
|
|
|
.line 613
|
|
iput-object p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->k:Lcom/moji/pulltorefresh/PullRefresher$OnContainerRefreshListener;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setPullToRefreshText(Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
.line 66
|
|
iput-object p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->o:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setRefreshTextID(I)V
|
|
.locals 0
|
|
|
|
.line 57
|
|
iput p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->n:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setShowHeaderText(Z)V
|
|
.locals 0
|
|
|
|
.line 628
|
|
iput-boolean p1, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->s:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTextColor(I)V
|
|
.locals 1
|
|
|
|
.line 96
|
|
iget-object v0, p0, Lcom/moji/pulltorefresh/PullToFreshContainer;->f:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setTextColor(I)V
|
|
|
|
return-void
|
|
.end method
|