.class public Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
.super Landroid/widget/LinearLayout;
.source "PicassoLinearLayout.java"

# interfaces
.implements Lcom/squareup/picasso/Target;


# instance fields
.field protected a:F

.field private b:Ljava/lang/String;

.field private c:I


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

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

    const/4 p1, -0x1

    .line 21
    iput p1, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->c:I

    return-void
.end method

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

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

    const/4 p1, -0x1

    .line 21
    iput p1, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->c:I

    return-void
.end method

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

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

    const/4 p1, -0x1

    .line 21
    iput p1, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->c:I

    return-void
.end method


# virtual methods
.method public a(Landroid/graphics/Bitmap;Lcom/squareup/picasso/Picasso$LoadedFrom;)V
    .locals 3

    .line 38
    new-instance p2, Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {p0}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-direct {p2, v0, p1}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V

    invoke-virtual {p0, p2}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 39
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result p2

    int-to-float p2, p2

    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result p1

    int-to-float p1, p1

    div-float/2addr p2, p1

    iput p2, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->a:F

    .line 40
    invoke-virtual {p0}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->requestLayout()V

    .line 41
    iget-object p1, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->b:Ljava/lang/String;

    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p1

    if-nez p1, :cond_0

    iget p1, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->c:I

    const/4 p2, -0x1

    if-eq p1, p2, :cond_0

    .line 42
    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object p1

    iget-object p2, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->b:Ljava/lang/String;

    iget v0, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->c:I

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v1

    invoke-virtual {p1, p2, v0, v1, v2}, Lcom/moji/mjad/statistics/AdStatistics;->e(Ljava/lang/String;IJ)V

    :cond_0
    return-void
.end method

.method public a(Landroid/graphics/drawable/Drawable;)V
    .locals 2

    .line 48
    iget-object p1, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->b:Ljava/lang/String;

    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p1

    if-nez p1, :cond_0

    iget p1, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->c:I

    const/4 v0, -0x1

    if-eq p1, v0, :cond_0

    .line 49
    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object p1

    iget-object v0, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->b:Ljava/lang/String;

    iget v1, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->c:I

    invoke-virtual {p1, v0, v1}, Lcom/moji/mjad/statistics/AdStatistics;->a(Ljava/lang/String;I)V

    :cond_0
    return-void
.end method

.method public b(Landroid/graphics/drawable/Drawable;)V
    .locals 0

    return-void
.end method

.method protected onMeasure(II)V
    .locals 1

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

    .line 61
    iget p1, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->a:F

    const/4 p2, 0x0

    cmpl-float p1, p1, p2

    if-eqz p1, :cond_0

    .line 62
    invoke-virtual {p0}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->getMeasuredWidth()I

    move-result p1

    invoke-virtual {p0}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->getMeasuredWidth()I

    move-result p2

    int-to-float p2, p2

    iget v0, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->a:F

    mul-float p2, p2, v0

    float-to-int p2, p2

    invoke-virtual {p0, p1, p2}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->setMeasuredDimension(II)V

    :cond_0
    return-void
.end method

.method public setBackgroundResource(I)V
    .locals 0

    .line 69
    invoke-super {p0, p1}, Landroid/widget/LinearLayout;->setBackgroundResource(I)V

    const/4 p1, 0x0

    .line 70
    iput p1, p0, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->a:F

    return-void
.end method
