.class public Lcom/view/XcProgressBar;
.super Landroid/view/View;


# instance fields
.field private a:Landroid/graphics/Paint;

.field private b:F

.field private c:Landroid/os/Handler;


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

    invoke-direct {p0, p1}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    const/4 v0, 0x0

    iput v0, p0, Lcom/view/XcProgressBar;->b:F

    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/view/XcProgressBar;->c:Landroid/os/Handler;

    return-void
.end method

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

    invoke-direct {p0, p1, p2}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 v0, 0x0

    iput v0, p0, Lcom/view/XcProgressBar;->b:F

    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/view/XcProgressBar;->c:Landroid/os/Handler;

    return-void
.end method

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

    invoke-direct {p0, p1, p2, p3}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 v0, 0x0

    iput v0, p0, Lcom/view/XcProgressBar;->b:F

    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/view/XcProgressBar;->c:Landroid/os/Handler;

    return-void
.end method


# virtual methods
.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 9

    const/16 v8, 0xff

    const/4 v1, 0x0

    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    invoke-virtual {p0}, Lcom/view/XcProgressBar;->getMeasuredWidth()I

    move-result v6

    invoke-virtual {p0}, Lcom/view/XcProgressBar;->getMeasuredHeight()I

    move-result v7

    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/view/XcProgressBar;->a:Landroid/graphics/Paint;

    iget v0, p0, Lcom/view/XcProgressBar;->b:F

    const/high16 v2, 0x41000000    # 8.0f

    add-float/2addr v0, v2

    iput v0, p0, Lcom/view/XcProgressBar;->b:F

    iget v0, p0, Lcom/view/XcProgressBar;->b:F

    int-to-float v2, v6

    cmpl-float v0, v0, v2

    if-lez v0, :cond_0

    iput v1, p0, Lcom/view/XcProgressBar;->b:F

    :cond_0
    iget-object v0, p0, Lcom/view/XcProgressBar;->a:Landroid/graphics/Paint;

    const/4 v2, 0x0

    const/16 v3, 0x26

    const/16 v4, 0x22

    invoke-static {v8, v2, v3, v4}, Landroid/graphics/Color;->argb(IIII)I

    move-result v2

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setColor(I)V

    iget-object v0, p0, Lcom/view/XcProgressBar;->a:Landroid/graphics/Paint;

    sget-object v2, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    int-to-float v3, v6

    int-to-float v4, v7

    iget-object v5, p0, Lcom/view/XcProgressBar;->a:Landroid/graphics/Paint;

    move-object v0, p1

    move v2, v1

    invoke-virtual/range {v0 .. v5}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    iget-object v0, p0, Lcom/view/XcProgressBar;->a:Landroid/graphics/Paint;

    const/16 v2, 0x31

    const/16 v3, 0xc4

    const/16 v4, 0xcb

    invoke-static {v8, v2, v3, v4}, Landroid/graphics/Color;->argb(IIII)I

    move-result v2

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setColor(I)V

    iget-object v0, p0, Lcom/view/XcProgressBar;->a:Landroid/graphics/Paint;

    sget-object v2, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    iget v3, p0, Lcom/view/XcProgressBar;->b:F

    iget v0, p0, Lcom/view/XcProgressBar;->b:F

    div-int/lit8 v2, v6, 0x4

    int-to-float v2, v2

    add-float v5, v0, v2

    int-to-float v6, v7

    iget-object v7, p0, Lcom/view/XcProgressBar;->a:Landroid/graphics/Paint;

    move-object v2, p1

    move v4, v1

    invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I

    iget-object v0, p0, Lcom/view/XcProgressBar;->c:Landroid/os/Handler;

    new-instance v1, Lcom/view/i;

    invoke-direct {v1, p0}, Lcom/view/i;-><init>(Lcom/view/XcProgressBar;)V

    const-wide/16 v2, 0xa

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    return-void
.end method

.method protected onVisibilityChanged(Landroid/view/View;I)V
    .locals 1

    invoke-super {p0, p1, p2}, Landroid/view/View;->onVisibilityChanged(Landroid/view/View;I)V

    const/4 v0, 0x0

    iput v0, p0, Lcom/view/XcProgressBar;->b:F

    return-void
.end method
