1386 lines
29 KiB
Smali
1386 lines
29 KiB
Smali
.class public Lcom/moji/NestedScrollLinearLayout;
|
|
.super Landroid/widget/LinearLayout;
|
|
.source "NestedScrollLinearLayout.java"
|
|
|
|
# interfaces
|
|
.implements Landroid/support/v4/view/NestedScrollingParent;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/NestedScrollLinearLayout$OnScrollAreaChangeListener;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private a:I
|
|
|
|
.field private b:I
|
|
|
|
.field private c:Landroid/view/View;
|
|
|
|
.field private d:Landroid/support/v4/view/NestedScrollingParentHelper;
|
|
|
|
.field private e:Landroid/widget/OverScroller;
|
|
|
|
.field private f:Landroid/view/VelocityTracker;
|
|
|
|
.field private g:I
|
|
|
|
.field private h:I
|
|
|
|
.field private i:I
|
|
|
|
.field private j:F
|
|
|
|
.field private k:F
|
|
|
|
.field private l:F
|
|
|
|
.field private m:F
|
|
|
|
.field private n:F
|
|
|
|
.field private o:F
|
|
|
|
.field private p:I
|
|
|
|
.field private q:Landroid/view/View;
|
|
|
|
.field private r:Lcom/moji/NestedScrollLinearLayout$OnScrollAreaChangeListener;
|
|
|
|
.field private s:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
.line 36
|
|
invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 26
|
|
iput v0, p0, Lcom/moji/NestedScrollLinearLayout;->b:I
|
|
|
|
.line 379
|
|
iput-boolean v0, p0, Lcom/moji/NestedScrollLinearLayout;->s:Z
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 37
|
|
invoke-direct {p0, p1, v0}, Lcom/moji/NestedScrollLinearLayout;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 1
|
|
.param p2 # Landroid/util/AttributeSet;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 41
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 26
|
|
iput v0, p0, Lcom/moji/NestedScrollLinearLayout;->b:I
|
|
|
|
.line 379
|
|
iput-boolean v0, p0, Lcom/moji/NestedScrollLinearLayout;->s:Z
|
|
|
|
.line 42
|
|
invoke-direct {p0, p1, p2}, Lcom/moji/NestedScrollLinearLayout;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 0
|
|
.param p2 # Landroid/util/AttributeSet;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 46
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
const/4 p3, 0x1
|
|
|
|
.line 26
|
|
iput p3, p0, Lcom/moji/NestedScrollLinearLayout;->b:I
|
|
|
|
.line 379
|
|
iput-boolean p3, p0, Lcom/moji/NestedScrollLinearLayout;->s:Z
|
|
|
|
.line 47
|
|
invoke-direct {p0, p1, p2}, Lcom/moji/NestedScrollLinearLayout;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a()V
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 202
|
|
iput v0, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
.line 203
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getChildCount()I
|
|
|
|
move-result v1
|
|
|
|
.line 204
|
|
:goto_0
|
|
iget v2, p0, Lcom/moji/NestedScrollLinearLayout;->b:I
|
|
|
|
sub-int v2, v1, v2
|
|
|
|
if-ge v0, v2, :cond_0
|
|
|
|
.line 205
|
|
invoke-virtual {p0, v0}, Lcom/moji/NestedScrollLinearLayout;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
.line 206
|
|
iget v3, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
invoke-virtual {v2}, Landroid/view/View;->getMeasuredHeight()I
|
|
|
|
move-result v2
|
|
|
|
add-int/2addr v3, v2
|
|
|
|
iput v3, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 2
|
|
.param p2 # Landroid/util/AttributeSet;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 52
|
|
sget-object v0, Lcom/moji/widget/R$styleable;->NestedScrollLinearLayout:[I
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object p2
|
|
|
|
.line 53
|
|
sget v0, Lcom/moji/widget/R$styleable;->NestedScrollLinearLayout_pinnedNum:I
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-virtual {p2, v0, v1}, Landroid/content/res/TypedArray;->getInteger(II)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/moji/NestedScrollLinearLayout;->b:I
|
|
|
|
.line 54
|
|
invoke-virtual {p2}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
.line 56
|
|
:cond_0
|
|
new-instance p2, Landroid/support/v4/view/NestedScrollingParentHelper;
|
|
|
|
invoke-direct {p2, p0}, Landroid/support/v4/view/NestedScrollingParentHelper;-><init>(Landroid/view/ViewGroup;)V
|
|
|
|
iput-object p2, p0, Lcom/moji/NestedScrollLinearLayout;->d:Landroid/support/v4/view/NestedScrollingParentHelper;
|
|
|
|
.line 57
|
|
new-instance p2, Landroid/widget/OverScroller;
|
|
|
|
invoke-direct {p2, p1}, Landroid/widget/OverScroller;-><init>(Landroid/content/Context;)V
|
|
|
|
iput-object p2, p0, Lcom/moji/NestedScrollLinearLayout;->e:Landroid/widget/OverScroller;
|
|
|
|
.line 58
|
|
invoke-static {p1}, Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;
|
|
|
|
move-result-object p1
|
|
|
|
.line 59
|
|
invoke-virtual {p1}, Landroid/view/ViewConfiguration;->getScaledTouchSlop()I
|
|
|
|
move-result p2
|
|
|
|
iput p2, p0, Lcom/moji/NestedScrollLinearLayout;->g:I
|
|
|
|
.line 60
|
|
invoke-virtual {p1}, Landroid/view/ViewConfiguration;->getScaledMinimumFlingVelocity()I
|
|
|
|
move-result p2
|
|
|
|
iput p2, p0, Lcom/moji/NestedScrollLinearLayout;->h:I
|
|
|
|
.line 61
|
|
invoke-virtual {p1}, Landroid/view/ViewConfiguration;->getScaledMaximumFlingVelocity()I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/moji/NestedScrollLinearLayout;->i:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(II)Z
|
|
.locals 5
|
|
|
|
.line 340
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getChildCount()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-lez v0, :cond_2
|
|
|
|
.line 341
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getScrollY()I
|
|
|
|
move-result v0
|
|
|
|
.line 342
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getChildCount()I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
sub-int/2addr v2, v3
|
|
|
|
invoke-virtual {p0, v2}, Lcom/moji/NestedScrollLinearLayout;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
.line 343
|
|
invoke-virtual {v2}, Landroid/view/View;->getTop()I
|
|
|
|
move-result v4
|
|
|
|
sub-int/2addr v4, v0
|
|
|
|
if-lt p2, v4, :cond_0
|
|
|
|
.line 344
|
|
invoke-virtual {v2}, Landroid/view/View;->getBottom()I
|
|
|
|
move-result v4
|
|
|
|
sub-int/2addr v4, v0
|
|
|
|
if-ge p2, v4, :cond_0
|
|
|
|
.line 345
|
|
invoke-virtual {v2}, Landroid/view/View;->getLeft()I
|
|
|
|
move-result p2
|
|
|
|
if-lt p1, p2, :cond_0
|
|
|
|
.line 346
|
|
invoke-virtual {v2}, Landroid/view/View;->getRight()I
|
|
|
|
move-result p2
|
|
|
|
if-lt p1, p2, :cond_1
|
|
|
|
:cond_0
|
|
const/4 v1, 0x1
|
|
|
|
:cond_1
|
|
return v1
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
.method private b()V
|
|
.locals 1
|
|
|
|
.line 325
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->f:Landroid/view/VelocityTracker;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 326
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->f:Landroid/view/VelocityTracker;
|
|
|
|
invoke-virtual {v0}, Landroid/view/VelocityTracker;->recycle()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 327
|
|
iput-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->f:Landroid/view/VelocityTracker;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private b(II)Z
|
|
.locals 3
|
|
|
|
.line 352
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->q:Landroid/view/View;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 353
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->q:Landroid/view/View;
|
|
|
|
invoke-virtual {v0}, Landroid/view/View;->getVisibility()I
|
|
|
|
move-result v0
|
|
|
|
const/16 v2, 0x8
|
|
|
|
if-ne v0, v2, :cond_0
|
|
|
|
return v1
|
|
|
|
.line 356
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getScrollY()I
|
|
|
|
move-result v0
|
|
|
|
.line 357
|
|
iget-object v2, p0, Lcom/moji/NestedScrollLinearLayout;->q:Landroid/view/View;
|
|
|
|
invoke-virtual {v2}, Landroid/view/View;->getTop()I
|
|
|
|
move-result v2
|
|
|
|
sub-int/2addr v2, v0
|
|
|
|
if-lt p2, v2, :cond_1
|
|
|
|
iget-object v2, p0, Lcom/moji/NestedScrollLinearLayout;->q:Landroid/view/View;
|
|
|
|
.line 358
|
|
invoke-virtual {v2}, Landroid/view/View;->getBottom()I
|
|
|
|
move-result v2
|
|
|
|
sub-int/2addr v2, v0
|
|
|
|
if-ge p2, v2, :cond_1
|
|
|
|
iget-object p2, p0, Lcom/moji/NestedScrollLinearLayout;->q:Landroid/view/View;
|
|
|
|
.line 359
|
|
invoke-virtual {p2}, Landroid/view/View;->getLeft()I
|
|
|
|
move-result p2
|
|
|
|
if-lt p1, p2, :cond_1
|
|
|
|
iget-object p2, p0, Lcom/moji/NestedScrollLinearLayout;->q:Landroid/view/View;
|
|
|
|
.line 360
|
|
invoke-virtual {p2}, Landroid/view/View;->getRight()I
|
|
|
|
move-result p2
|
|
|
|
if-ge p1, p2, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_1
|
|
return v1
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
.method private c()V
|
|
.locals 1
|
|
|
|
.line 332
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->f:Landroid/view/VelocityTracker;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 333
|
|
invoke-static {}, Landroid/view/VelocityTracker;->obtain()Landroid/view/VelocityTracker;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->f:Landroid/view/VelocityTracker;
|
|
|
|
goto :goto_0
|
|
|
|
.line 335
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->f:Landroid/view/VelocityTracker;
|
|
|
|
invoke-virtual {v0}, Landroid/view/VelocityTracker;->clear()V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Landroid/view/View;)Z
|
|
.locals 1
|
|
|
|
const/4 v0, -0x1
|
|
|
|
.line 134
|
|
invoke-static {p1, v0}, Landroid/support/v4/view/ViewCompat;->canScrollVertically(Landroid/view/View;I)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public canScrollVertically(I)Z
|
|
.locals 2
|
|
|
|
.line 122
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getScrollY()I
|
|
|
|
move-result p1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-lez p1, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 126
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/moji/NestedScrollLinearLayout;->c:Landroid/view/View;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 127
|
|
iget-object p1, p0, Lcom/moji/NestedScrollLinearLayout;->c:Landroid/view/View;
|
|
|
|
invoke-virtual {p0, p1}, Lcom/moji/NestedScrollLinearLayout;->a(Landroid/view/View;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
if-lez p1, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public computeScroll()V
|
|
.locals 2
|
|
|
|
.line 155
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->e:Landroid/widget/OverScroller;
|
|
|
|
invoke-virtual {v0}, Landroid/widget/OverScroller;->computeScrollOffset()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 156
|
|
iget-object v1, p0, Lcom/moji/NestedScrollLinearLayout;->e:Landroid/widget/OverScroller;
|
|
|
|
invoke-virtual {v1}, Landroid/widget/OverScroller;->getCurrY()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p0, v0, v1}, Lcom/moji/NestedScrollLinearLayout;->scrollTo(II)V
|
|
|
|
.line 157
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->invalidate()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
|
|
.locals 13
|
|
|
|
.line 215
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 217
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/moji/NestedScrollLinearLayout;->j:F
|
|
|
|
.line 218
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/moji/NestedScrollLinearLayout;->k:F
|
|
|
|
.line 219
|
|
iput v1, p0, Lcom/moji/NestedScrollLinearLayout;->m:F
|
|
|
|
iput v1, p0, Lcom/moji/NestedScrollLinearLayout;->l:F
|
|
|
|
.line 220
|
|
invoke-direct {p0}, Lcom/moji/NestedScrollLinearLayout;->c()V
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_0
|
|
const/4 v2, 0x2
|
|
|
|
if-ne v0, v2, :cond_1
|
|
|
|
.line 222
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F
|
|
|
|
move-result v0
|
|
|
|
iget v1, p0, Lcom/moji/NestedScrollLinearLayout;->j:F
|
|
|
|
sub-float/2addr v0, v1
|
|
|
|
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/moji/NestedScrollLinearLayout;->l:F
|
|
|
|
.line 223
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F
|
|
|
|
move-result v0
|
|
|
|
iget v1, p0, Lcom/moji/NestedScrollLinearLayout;->k:F
|
|
|
|
sub-float/2addr v0, v1
|
|
|
|
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/moji/NestedScrollLinearLayout;->m:F
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v2, 0x1
|
|
|
|
if-ne v0, v2, :cond_3
|
|
|
|
.line 225
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->f:Landroid/view/VelocityTracker;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget v0, p0, Lcom/moji/NestedScrollLinearLayout;->m:F
|
|
|
|
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v0
|
|
|
|
iget v3, p0, Lcom/moji/NestedScrollLinearLayout;->l:F
|
|
|
|
invoke-static {v3}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v3
|
|
|
|
cmpl-float v0, v0, v3
|
|
|
|
if-lez v0, :cond_2
|
|
|
|
.line 226
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->f:Landroid/view/VelocityTracker;
|
|
|
|
const/16 v3, 0x1f4
|
|
|
|
.line 227
|
|
iget v4, p0, Lcom/moji/NestedScrollLinearLayout;->i:I
|
|
|
|
int-to-float v4, v4
|
|
|
|
invoke-virtual {v0, v3, v4}, Landroid/view/VelocityTracker;->computeCurrentVelocity(IF)V
|
|
|
|
.line 228
|
|
invoke-virtual {v0}, Landroid/view/VelocityTracker;->getYVelocity()F
|
|
|
|
move-result v0
|
|
|
|
float-to-int v0, v0
|
|
|
|
.line 229
|
|
invoke-static {v0}, Ljava/lang/Math;->abs(I)I
|
|
|
|
move-result v3
|
|
|
|
iget v4, p0, Lcom/moji/NestedScrollLinearLayout;->h:I
|
|
|
|
if-le v3, v4, :cond_2
|
|
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
|
|
|
|
move-result v3
|
|
|
|
float-to-int v3, v3
|
|
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
|
|
|
|
move-result v4
|
|
|
|
float-to-int v4, v4
|
|
|
|
invoke-direct {p0, v3, v4}, Lcom/moji/NestedScrollLinearLayout;->a(II)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
.line 230
|
|
iget-object v4, p0, Lcom/moji/NestedScrollLinearLayout;->e:Landroid/widget/OverScroller;
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getScrollY()I
|
|
|
|
move-result v6
|
|
|
|
const/4 v7, 0x0
|
|
|
|
neg-int v8, v0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
iget v12, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
invoke-virtual/range {v4 .. v12}, Landroid/widget/OverScroller;->fling(IIIIIIII)V
|
|
|
|
.line 231
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->invalidate()V
|
|
|
|
.line 232
|
|
invoke-direct {p0}, Lcom/moji/NestedScrollLinearLayout;->b()V
|
|
|
|
return v2
|
|
|
|
.line 236
|
|
:cond_2
|
|
iput v1, p0, Lcom/moji/NestedScrollLinearLayout;->m:F
|
|
|
|
iput v1, p0, Lcom/moji/NestedScrollLinearLayout;->l:F
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
const/4 v2, 0x3
|
|
|
|
if-ne v0, v2, :cond_4
|
|
|
|
.line 238
|
|
iput v1, p0, Lcom/moji/NestedScrollLinearLayout;->m:F
|
|
|
|
iput v1, p0, Lcom/moji/NestedScrollLinearLayout;->l:F
|
|
|
|
.line 240
|
|
:cond_4
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->f:Landroid/view/VelocityTracker;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
.line 241
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->f:Landroid/view/VelocityTracker;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/view/VelocityTracker;->addMovement(Landroid/view/MotionEvent;)V
|
|
|
|
.line 243
|
|
:cond_5
|
|
invoke-super {p0, p1}, Landroid/widget/LinearLayout;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getNestedScrollAxes()I
|
|
.locals 1
|
|
|
|
.line 82
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->d:Landroid/support/v4/view/NestedScrollingParentHelper;
|
|
|
|
invoke-virtual {v0}, Landroid/support/v4/view/NestedScrollingParentHelper;->getNestedScrollAxes()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method protected onDetachedFromWindow()V
|
|
.locals 0
|
|
|
|
.line 368
|
|
invoke-super {p0}, Landroid/widget/LinearLayout;->onDetachedFromWindow()V
|
|
|
|
.line 369
|
|
invoke-direct {p0}, Lcom/moji/NestedScrollLinearLayout;->b()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
|
|
.locals 12
|
|
|
|
.line 251
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
|
|
|
|
move-result v0
|
|
|
|
.line 252
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
|
|
|
|
move-result v1
|
|
|
|
.line 253
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
const/4 v5, 0x2
|
|
|
|
if-eq v2, v5, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 262
|
|
:cond_0
|
|
iget v2, p0, Lcom/moji/NestedScrollLinearLayout;->n:F
|
|
|
|
sub-float v2, v0, v2
|
|
|
|
.line 263
|
|
iget v5, p0, Lcom/moji/NestedScrollLinearLayout;->o:F
|
|
|
|
sub-float v5, v1, v5
|
|
|
|
.line 264
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
|
|
|
|
move-result v6
|
|
|
|
float-to-int v6, v6
|
|
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
|
|
|
|
move-result v7
|
|
|
|
float-to-int v7, v7
|
|
|
|
invoke-direct {p0, v6, v7}, Lcom/moji/NestedScrollLinearLayout;->b(II)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
.line 265
|
|
invoke-static {v2}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v2
|
|
|
|
float-to-double v6, v2
|
|
|
|
const-wide v8, 0x3fc999999999999aL # 0.2
|
|
|
|
invoke-static {v5}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v2
|
|
|
|
float-to-double v10, v2
|
|
|
|
invoke-static {v10, v11}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
mul-double v10, v10, v8
|
|
|
|
cmpl-double v2, v6, v10
|
|
|
|
if-ltz v2, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
.line 270
|
|
:cond_2
|
|
invoke-static {v2}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v2
|
|
|
|
iget v6, p0, Lcom/moji/NestedScrollLinearLayout;->g:I
|
|
|
|
int-to-float v6, v6
|
|
|
|
cmpl-float v2, v2, v6
|
|
|
|
if-gtz v2, :cond_3
|
|
|
|
invoke-static {v5}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v2
|
|
|
|
iget v5, p0, Lcom/moji/NestedScrollLinearLayout;->g:I
|
|
|
|
int-to-float v5, v5
|
|
|
|
cmpl-float v2, v2, v5
|
|
|
|
if-lez v2, :cond_5
|
|
|
|
:cond_3
|
|
float-to-int v2, v0
|
|
|
|
float-to-int v5, v1
|
|
|
|
.line 271
|
|
invoke-direct {p0, v2, v5}, Lcom/moji/NestedScrollLinearLayout;->a(II)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
goto :goto_0
|
|
|
|
.line 257
|
|
:cond_4
|
|
iget-object v2, p0, Lcom/moji/NestedScrollLinearLayout;->e:Landroid/widget/OverScroller;
|
|
|
|
invoke-virtual {v2}, Landroid/widget/OverScroller;->isFinished()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_5
|
|
|
|
.line 258
|
|
iget-object v2, p0, Lcom/moji/NestedScrollLinearLayout;->e:Landroid/widget/OverScroller;
|
|
|
|
invoke-virtual {v2}, Landroid/widget/OverScroller;->abortAnimation()V
|
|
|
|
.line 284
|
|
:cond_5
|
|
:goto_1
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
|
|
|
|
move-result p1
|
|
|
|
float-to-int p1, p1
|
|
|
|
iput p1, p0, Lcom/moji/NestedScrollLinearLayout;->p:I
|
|
|
|
.line 285
|
|
iput v0, p0, Lcom/moji/NestedScrollLinearLayout;->n:F
|
|
|
|
.line 286
|
|
iput v1, p0, Lcom/moji/NestedScrollLinearLayout;->o:F
|
|
|
|
return v4
|
|
.end method
|
|
|
|
.method protected onMeasure(II)V
|
|
.locals 4
|
|
|
|
.line 189
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getChildCount()I
|
|
|
|
move-result p2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, p2, :cond_0
|
|
|
|
.line 192
|
|
invoke-virtual {p0, v1}, Lcom/moji/NestedScrollLinearLayout;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v3
|
|
|
|
.line 193
|
|
invoke-virtual {v3}, Landroid/view/View;->getMeasuredHeight()I
|
|
|
|
move-result v3
|
|
|
|
add-int/2addr v2, v3
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/high16 p2, 0x40000000 # 2.0f
|
|
|
|
.line 195
|
|
invoke-static {v2, p2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
|
|
|
move-result p2
|
|
|
|
.line 196
|
|
invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
|
|
|
|
.line 197
|
|
invoke-direct {p0}, Lcom/moji/NestedScrollLinearLayout;->a()V
|
|
|
|
.line 198
|
|
invoke-virtual {p0, v0, v0}, Lcom/moji/NestedScrollLinearLayout;->scrollBy(II)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onNestedFling(Landroid/view/View;FFZ)Z
|
|
.locals 0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public onNestedPreFling(Landroid/view/View;FF)Z
|
|
.locals 9
|
|
|
|
.line 144
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getScrollY()I
|
|
|
|
move-result p1
|
|
|
|
iget p2, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
if-lt p1, p2, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
.line 147
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->e:Landroid/widget/OverScroller;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getScrollY()I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
float-to-int v4, p3
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
iget v8, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
invoke-virtual/range {v0 .. v8}, Landroid/widget/OverScroller;->fling(IIIIIIII)V
|
|
|
|
.line 148
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->invalidate()V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public onNestedPreScroll(Landroid/view/View;II[I)V
|
|
.locals 3
|
|
|
|
.line 91
|
|
iget p2, p0, Lcom/moji/NestedScrollLinearLayout;->l:F
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
cmpl-float p2, p2, v0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
iget p2, p0, Lcom/moji/NestedScrollLinearLayout;->m:F
|
|
|
|
cmpl-float p2, p2, v0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 92
|
|
iget p2, p0, Lcom/moji/NestedScrollLinearLayout;->l:F
|
|
|
|
iget v0, p0, Lcom/moji/NestedScrollLinearLayout;->m:F
|
|
|
|
cmpg-float p2, p2, v0
|
|
|
|
if-gez p2, :cond_1
|
|
|
|
.line 93
|
|
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {p2, v1}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 96
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {p2, v2}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V
|
|
|
|
.line 98
|
|
:cond_1
|
|
:goto_0
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getScrollY()I
|
|
|
|
move-result p2
|
|
|
|
if-lez p3, :cond_3
|
|
|
|
.line 100
|
|
iget p1, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
if-ge p2, p1, :cond_5
|
|
|
|
add-int p1, p3, p2
|
|
|
|
.line 101
|
|
iget v0, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
if-le p1, v0, :cond_2
|
|
|
|
.line 102
|
|
iget p1, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
sub-int p3, p1, p2
|
|
|
|
.line 104
|
|
:cond_2
|
|
invoke-virtual {p0, v2, p3}, Lcom/moji/NestedScrollLinearLayout;->scrollBy(II)V
|
|
|
|
.line 105
|
|
aput p3, p4, v1
|
|
|
|
goto :goto_1
|
|
|
|
.line 108
|
|
:cond_3
|
|
invoke-virtual {p0, p1}, Lcom/moji/NestedScrollLinearLayout;->a(Landroid/view/View;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_5
|
|
|
|
if-lez p2, :cond_5
|
|
|
|
.line 110
|
|
invoke-static {p3}, Ljava/lang/Math;->abs(I)I
|
|
|
|
move-result p1
|
|
|
|
sub-int/2addr p1, p2
|
|
|
|
if-lez p1, :cond_4
|
|
|
|
mul-int/lit8 p3, p2, -0x1
|
|
|
|
.line 113
|
|
:cond_4
|
|
invoke-virtual {p0, v2, p3}, Lcom/moji/NestedScrollLinearLayout;->scrollBy(II)V
|
|
|
|
.line 114
|
|
aput p3, p4, v1
|
|
|
|
:cond_5
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public onNestedScroll(Landroid/view/View;IIII)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onNestedScrollAccepted(Landroid/view/View;Landroid/view/View;I)V
|
|
.locals 1
|
|
|
|
.line 71
|
|
iput-object p2, p0, Lcom/moji/NestedScrollLinearLayout;->c:Landroid/view/View;
|
|
|
|
.line 72
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->d:Landroid/support/v4/view/NestedScrollingParentHelper;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Landroid/support/v4/view/NestedScrollingParentHelper;->onNestedScrollAccepted(Landroid/view/View;Landroid/view/View;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onStartNestedScroll(Landroid/view/View;Landroid/view/View;I)Z
|
|
.locals 0
|
|
|
|
and-int/lit8 p1, p3, 0x2
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return p1
|
|
.end method
|
|
|
|
.method public onStopNestedScroll(Landroid/view/View;)V
|
|
.locals 1
|
|
|
|
.line 77
|
|
iget-object v0, p0, Lcom/moji/NestedScrollLinearLayout;->d:Landroid/support/v4/view/NestedScrollingParentHelper;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/support/v4/view/NestedScrollingParentHelper;->onStopNestedScroll(Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
|
|
.locals 3
|
|
|
|
.line 295
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getActionIndex()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return v1
|
|
|
|
.line 299
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
|
|
|
|
.line 300
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
|
|
|
|
move-result v0
|
|
|
|
float-to-int v0, v0
|
|
|
|
.line 301
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result p1
|
|
|
|
packed-switch p1, :pswitch_data_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 309
|
|
:pswitch_0
|
|
iget p1, p0, Lcom/moji/NestedScrollLinearLayout;->p:I
|
|
|
|
sub-int/2addr p1, v0
|
|
|
|
.line 310
|
|
iput v0, p0, Lcom/moji/NestedScrollLinearLayout;->p:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 311
|
|
invoke-virtual {p0, v2, p1}, Lcom/moji/NestedScrollLinearLayout;->scrollBy(II)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 304
|
|
:pswitch_1
|
|
iget-object p1, p0, Lcom/moji/NestedScrollLinearLayout;->e:Landroid/widget/OverScroller;
|
|
|
|
invoke-virtual {p1}, Landroid/widget/OverScroller;->isFinished()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
.line 305
|
|
iget-object p1, p0, Lcom/moji/NestedScrollLinearLayout;->e:Landroid/widget/OverScroller;
|
|
|
|
invoke-virtual {p1}, Landroid/widget/OverScroller;->abortAnimation()V
|
|
|
|
.line 319
|
|
:cond_1
|
|
:goto_0
|
|
:pswitch_2
|
|
iput v0, p0, Lcom/moji/NestedScrollLinearLayout;->p:I
|
|
|
|
return v1
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_1
|
|
:pswitch_2
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public scrollTo(II)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-gez p2, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
.line 166
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/moji/NestedScrollLinearLayout;->r:Lcom/moji/NestedScrollLinearLayout$OnScrollAreaChangeListener;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 167
|
|
iget v1, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
if-lt p2, v1, :cond_1
|
|
|
|
.line 168
|
|
iget-boolean v1, p0, Lcom/moji/NestedScrollLinearLayout;->s:Z
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 169
|
|
iput-boolean v0, p0, Lcom/moji/NestedScrollLinearLayout;->s:Z
|
|
|
|
.line 170
|
|
iget-object v1, p0, Lcom/moji/NestedScrollLinearLayout;->r:Lcom/moji/NestedScrollLinearLayout$OnScrollAreaChangeListener;
|
|
|
|
invoke-interface {v1, v0}, Lcom/moji/NestedScrollLinearLayout$OnScrollAreaChangeListener;->a(Z)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 173
|
|
:cond_1
|
|
iget-boolean v0, p0, Lcom/moji/NestedScrollLinearLayout;->s:Z
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 174
|
|
iput-boolean v0, p0, Lcom/moji/NestedScrollLinearLayout;->s:Z
|
|
|
|
.line 175
|
|
iget-object v1, p0, Lcom/moji/NestedScrollLinearLayout;->r:Lcom/moji/NestedScrollLinearLayout$OnScrollAreaChangeListener;
|
|
|
|
invoke-interface {v1, v0}, Lcom/moji/NestedScrollLinearLayout$OnScrollAreaChangeListener;->a(Z)V
|
|
|
|
.line 179
|
|
:cond_2
|
|
:goto_0
|
|
iget v0, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
if-le p2, v0, :cond_3
|
|
|
|
.line 180
|
|
iget p2, p0, Lcom/moji/NestedScrollLinearLayout;->a:I
|
|
|
|
.line 182
|
|
:cond_3
|
|
invoke-virtual {p0}, Lcom/moji/NestedScrollLinearLayout;->getScrollY()I
|
|
|
|
move-result v0
|
|
|
|
if-eq p2, v0, :cond_4
|
|
|
|
.line 183
|
|
invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->scrollTo(II)V
|
|
|
|
:cond_4
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCanScrollViewInHeader(Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
.line 375
|
|
iput-object p1, p0, Lcom/moji/NestedScrollLinearLayout;->q:Landroid/view/View;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setOnScrollAreaChangeListener(Lcom/moji/NestedScrollLinearLayout$OnScrollAreaChangeListener;)V
|
|
.locals 0
|
|
|
|
.line 382
|
|
iput-object p1, p0, Lcom/moji/NestedScrollLinearLayout;->r:Lcom/moji/NestedScrollLinearLayout$OnScrollAreaChangeListener;
|
|
|
|
return-void
|
|
.end method
|