.class public Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView;
.super Landroid/widget/HorizontalScrollView;
.source "HorizontalScrollChartParentView.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView$OnScrollListener;
    }
.end annotation


# instance fields
.field a:I

.field private b:Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView$OnScrollListener;


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

    .line 22
    invoke-direct {p0, p1}, Landroid/widget/HorizontalScrollView;-><init>(Landroid/content/Context;)V

    const/4 p1, -0x1

    .line 50
    iput p1, p0, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView;->a:I

    return-void
.end method

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

    .line 26
    invoke-direct {p0, p1, p2}, Landroid/widget/HorizontalScrollView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 p1, -0x1

    .line 50
    iput p1, p0, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView;->a:I

    return-void
.end method

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

    .line 30
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/HorizontalScrollView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p1, -0x1

    .line 50
    iput p1, p0, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView;->a:I

    return-void
.end method


# virtual methods
.method protected onRestoreInstanceState(Landroid/os/Parcelable;)V
    .locals 0

    .line 80
    :try_start_0
    invoke-super {p0, p1}, Landroid/widget/HorizontalScrollView;->onRestoreInstanceState(Landroid/os/Parcelable;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

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

    :goto_0
    return-void
.end method

.method protected onScrollChanged(IIII)V
    .locals 1

    .line 45
    invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/HorizontalScrollView;->onScrollChanged(IIII)V

    .line 46
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView;->b:Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView$OnScrollListener;

    if-eqz v0, :cond_0

    .line 47
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView;->b:Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView$OnScrollListener;

    invoke-interface {v0, p1, p2, p3, p4}, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView$OnScrollListener;->a(IIII)V

    :cond_0
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 3

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

    move-result v0

    packed-switch v0, :pswitch_data_0

    goto :goto_1

    .line 58
    :pswitch_0
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView;->b:Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView$OnScrollListener;

    if-eqz v0, :cond_1

    .line 59
    iget-object v0, p0, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView;->b:Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView$OnScrollListener;

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v1

    iget v2, p0, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView;->a:I

    int-to-float v2, v2

    cmpg-float v1, v1, v2

    if-gez v1, :cond_0

    const/4 v1, 0x1

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    :goto_0
    invoke-interface {v0, v1}, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView$OnScrollListener;->a(Z)V

    goto :goto_1

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

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView;->a:I

    .line 63
    :cond_1
    :goto_1
    invoke-super {p0, p1}, Landroid/widget/HorizontalScrollView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result p1

    return p1

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public setOnScrollListener(Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView$OnScrollListener;)V
    .locals 0

    .line 34
    iput-object p1, p0, Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView;->b:Lcom/moji/mjweather/aqi/widget/HorizontalScrollChartParentView$OnScrollListener;

    return-void
.end method
