.class public Lcom/moji/mjallergy/view/ShadowLayout;
.super Landroid/widget/LinearLayout;
.source "ShadowLayout.java"


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

.field private b:Landroid/graphics/RectF;

.field private c:I

.field private d:F

.field private e:F

.field private f:F

.field private g:F


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

    const/4 v0, 0x0

    .line 49
    invoke-direct {p0, p1, v0}, Lcom/moji/mjallergy/view/ShadowLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

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

    const/4 v0, 0x0

    .line 53
    invoke-direct {p0, p1, p2, v0}, Lcom/moji/mjallergy/view/ShadowLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

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

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

    .line 19
    new-instance p1, Landroid/graphics/Paint;

    const/4 p3, 0x1

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

    iput-object p1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->a:Landroid/graphics/Paint;

    .line 21
    new-instance p1, Landroid/graphics/RectF;

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

    iput-object p1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->b:Landroid/graphics/RectF;

    const/4 p1, 0x0

    const/16 p3, 0x19

    .line 26
    invoke-static {p3, p1, p1, p1}, Landroid/graphics/Color;->argb(IIII)I

    move-result p1

    iput p1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->c:I

    const/high16 p1, 0x41000000    # 8.0f

    .line 31
    iput p1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->d:F

    const/high16 p1, 0x40000000    # 2.0f

    .line 36
    invoke-static {p1}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result p1

    int-to-float p1, p1

    iput p1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->e:F

    const/4 p1, 0x0

    .line 41
    iput p1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->f:F

    const/high16 p1, 0x40800000    # 4.0f

    .line 46
    invoke-static {p1}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result p1

    int-to-float p1, p1

    iput p1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->g:F

    .line 58
    invoke-direct {p0, p2}, Lcom/moji/mjallergy/view/ShadowLayout;->a(Landroid/util/AttributeSet;)V

    return-void
.end method

.method private a()V
    .locals 6

    .line 75
    invoke-virtual {p0}, Lcom/moji/mjallergy/view/ShadowLayout;->getWidth()I

    move-result v0

    int-to-float v0, v0

    iget v1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->e:F

    sub-float/2addr v0, v1

    iget v1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->f:F

    sub-float/2addr v0, v1

    .line 76
    iget v1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->e:F

    float-to-int v1, v1

    iget v2, p0, Lcom/moji/mjallergy/view/ShadowLayout;->f:F

    float-to-int v2, v2

    add-int/2addr v1, v2

    .line 78
    invoke-virtual {p0}, Lcom/moji/mjallergy/view/ShadowLayout;->getHeight()I

    move-result v2

    int-to-float v2, v2

    iget v3, p0, Lcom/moji/mjallergy/view/ShadowLayout;->e:F

    sub-float/2addr v2, v3

    iget v3, p0, Lcom/moji/mjallergy/view/ShadowLayout;->g:F

    sub-float/2addr v2, v3

    .line 79
    iget v3, p0, Lcom/moji/mjallergy/view/ShadowLayout;->e:F

    float-to-int v3, v3

    iget v4, p0, Lcom/moji/mjallergy/view/ShadowLayout;->g:F

    float-to-int v4, v4

    add-int/2addr v3, v4

    .line 81
    iget-object v4, p0, Lcom/moji/mjallergy/view/ShadowLayout;->b:Landroid/graphics/RectF;

    const/4 v5, 0x0

    iput v5, v4, Landroid/graphics/RectF;->left:F

    .line 82
    iget-object v4, p0, Lcom/moji/mjallergy/view/ShadowLayout;->b:Landroid/graphics/RectF;

    iput v5, v4, Landroid/graphics/RectF;->top:F

    .line 83
    iget-object v4, p0, Lcom/moji/mjallergy/view/ShadowLayout;->b:Landroid/graphics/RectF;

    iput v0, v4, Landroid/graphics/RectF;->right:F

    .line 84
    iget-object v0, p0, Lcom/moji/mjallergy/view/ShadowLayout;->b:Landroid/graphics/RectF;

    iput v2, v0, Landroid/graphics/RectF;->bottom:F

    const/4 v0, 0x0

    .line 85
    invoke-virtual {p0, v0, v0, v1, v3}, Lcom/moji/mjallergy/view/ShadowLayout;->setPadding(IIII)V

    return-void
.end method

.method private a(Landroid/util/AttributeSet;)V
    .locals 4

    const/4 p1, 0x1

    const/4 v0, 0x0

    .line 121
    invoke-virtual {p0, p1, v0}, Lcom/moji/mjallergy/view/ShadowLayout;->setLayerType(ILandroid/graphics/Paint;)V

    const/4 v0, 0x0

    .line 122
    invoke-virtual {p0, v0}, Lcom/moji/mjallergy/view/ShadowLayout;->setWillNotDraw(Z)V

    .line 124
    iget-object v1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->a:Landroid/graphics/Paint;

    invoke-virtual {v1, p1}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 125
    iget-object p1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->a:Landroid/graphics/Paint;

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

    .line 126
    iget-object p1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->a:Landroid/graphics/Paint;

    iget v0, p0, Lcom/moji/mjallergy/view/ShadowLayout;->d:F

    iget v1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->f:F

    iget v2, p0, Lcom/moji/mjallergy/view/ShadowLayout;->g:F

    iget v3, p0, Lcom/moji/mjallergy/view/ShadowLayout;->c:I

    invoke-virtual {p1, v0, v1, v2, v3}, Landroid/graphics/Paint;->setShadowLayer(FFFI)V

    return-void
.end method


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

    .line 111
    invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onDraw(Landroid/graphics/Canvas;)V

    .line 112
    iget-object v0, p0, Lcom/moji/mjallergy/view/ShadowLayout;->b:Landroid/graphics/RectF;

    iget-object v1, p0, Lcom/moji/mjallergy/view/ShadowLayout;->a:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/RectF;Landroid/graphics/Paint;)V

    return-void
.end method

.method protected onLayout(ZIIII)V
    .locals 0

    .line 93
    invoke-super/range {p0 .. p5}, Landroid/widget/LinearLayout;->onLayout(ZIIII)V

    .line 95
    invoke-direct {p0}, Lcom/moji/mjallergy/view/ShadowLayout;->a()V

    return-void
.end method

.method protected onMeasure(II)V
    .locals 0

    .line 103
    invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V

    return-void
.end method
