.class public Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;
.super Landroid/support/v4/view/ViewPager;
.source "AssistSlipViewPager.java"


# instance fields
.field private a:I

.field private b:I

.field private c:F

.field private d:F

.field private e:F

.field private f:F

.field private g:I

.field private h:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    .line 44
    invoke-direct {p0, p1}, Landroid/support/v4/view/ViewPager;-><init>(Landroid/content/Context;)V

    const/4 v0, -0x1

    .line 31
    iput v0, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->g:I

    const/4 v0, 0x0

    .line 37
    iput-boolean v0, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->h:Z

    .line 45
    invoke-direct {p0, p1}, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->a(Landroid/content/Context;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    .line 49
    invoke-direct {p0, p1, p2}, Landroid/support/v4/view/ViewPager;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 p2, -0x1

    .line 31
    iput p2, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->g:I

    const/4 p2, 0x0

    .line 37
    iput-boolean p2, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->h:Z

    .line 50
    invoke-direct {p0, p1}, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->a(Landroid/content/Context;)V

    return-void
.end method

.method private a(Landroid/content/Context;)V
    .locals 0

    .line 54
    invoke-static {p1}, Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;

    move-result-object p1

    .line 55
    invoke-virtual {p1}, Landroid/view/ViewConfiguration;->getScaledTouchSlop()I

    move-result p1

    iput p1, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->b:I

    return-void
.end method


# virtual methods
.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 2

    .line 60
    iget-boolean v0, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->h:Z

    if-eqz v0, :cond_0

    .line 61
    invoke-super {p0, p1}, Landroid/support/v4/view/ViewPager;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z

    move-result p1

    return p1

    .line 64
    :cond_0
    invoke-virtual {p0}, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    if-eqz v0, :cond_1

    const/4 v1, 0x1

    .line 67
    :try_start_0
    invoke-interface {v0, v1}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    const-string v1, "AssistSlipViewPager"

    .line 69
    invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 73
    :cond_1
    :goto_0
    :try_start_1
    invoke-super {p0, p1}, Landroid/support/v4/view/ViewPager;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z

    move-result p1
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    return p1

    :catch_1
    move-exception p1

    const-string v0, "AssistSlipViewPager"

    .line 75
    invoke-static {v0, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    const/4 p1, 0x0

    return p1
.end method

.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 4

    .line 83
    iget-boolean v0, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->h:Z

    if-eqz v0, :cond_0

    .line 84
    invoke-super {p0, p1}, Landroid/support/v4/view/ViewPager;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z

    move-result p1

    return p1

    .line 87
    :cond_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    and-int/lit16 v0, v0, 0xff

    if-eqz v0, :cond_1

    goto :goto_0

    .line 91
    :cond_1
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->e:F

    iput v0, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->c:F

    .line 92
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->f:F

    iput v0, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->d:F

    const/4 v0, 0x0

    .line 93
    invoke-static {p1, v0}, Landroid/support/v4/view/MotionEventCompat;->getPointerId(Landroid/view/MotionEvent;I)I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->g:I

    .line 96
    :goto_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    iget v1, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->c:F

    sub-float/2addr v0, v1

    .line 97
    invoke-static {v0}, Ljava/lang/Math;->abs(F)F

    move-result v0

    .line 98
    invoke-virtual {p0}, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    const/4 v2, 0x1

    if-eqz v1, :cond_2

    .line 100
    invoke-interface {v1, v2}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V

    .line 102
    :cond_2
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v1

    iput v1, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->c:F

    .line 103
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v1

    const/4 v3, 0x2

    if-ne v1, v3, :cond_3

    iget v1, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->b:I

    int-to-float v1, v1

    cmpl-float v0, v0, v1

    if-lez v0, :cond_3

    return v2

    .line 105
    :cond_3
    invoke-super {p0, p1}, Landroid/support/v4/view/ViewPager;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z

    move-result p1

    return p1
.end method

.method public setHeight(I)V
    .locals 1

    .line 110
    invoke-virtual {p0}, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    iput p1, v0, Landroid/view/ViewGroup$LayoutParams;->height:I

    .line 111
    invoke-virtual {p0}, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->postInvalidate()V

    return-void
.end method

.method public setInitialVelocity(I)V
    .locals 0

    .line 40
    iput p1, p0, Lcom/moji/mjweather/assshop/view/AssistSlipViewPager;->a:I

    return-void
.end method
