.class public Lcom/moji/mjweather/tabme/widget/BannerImageView;
.super Landroid/widget/ImageView;
.source "BannerImageView.java"


# instance fields
.field private a:F

.field private b:F


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

    const/4 v0, 0x0

    .line 27
    invoke-direct {p0, p1, v0}, Lcom/moji/mjweather/tabme/widget/BannerImageView;-><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
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

    const/4 v0, 0x0

    .line 31
    invoke-direct {p0, p1, p2, v0}, Lcom/moji/mjweather/tabme/widget/BannerImageView;-><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
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

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

    .line 36
    invoke-direct {p0}, Lcom/moji/mjweather/tabme/widget/BannerImageView;->a()V

    return-void
.end method

.method private a()V
    .locals 5

    .line 40
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

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

    move-result-object v0

    const v1, 0x7f070055

    .line 41
    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I

    move-result v1

    invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I

    move-result v2

    const v3, 0x7f070168

    .line 42
    invoke-virtual {v0, v3}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v3

    const v4, 0x7f070157

    invoke-virtual {v0, v4}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v0

    div-float/2addr v3, v0

    mul-int/lit8 v1, v1, 0x3

    sub-int/2addr v2, v1

    int-to-float v0, v2

    const/high16 v1, 0x40300000    # 2.75f

    div-float/2addr v0, v1

    .line 45
    iput v0, p0, Lcom/moji/mjweather/tabme/widget/BannerImageView;->a:F

    .line 46
    iget v0, p0, Lcom/moji/mjweather/tabme/widget/BannerImageView;->a:F

    div-float/2addr v0, v3

    iput v0, p0, Lcom/moji/mjweather/tabme/widget/BannerImageView;->b:F

    return-void
.end method


# virtual methods
.method protected onMeasure(II)V
    .locals 1

    const-string p1, "BannerImageView"

    .line 51
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "onMeasure: "

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v0, p0, Lcom/moji/mjweather/tabme/widget/BannerImageView;->b:F

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    const-string v0, "    "

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v0, p0, Lcom/moji/mjweather/tabme/widget/BannerImageView;->b:F

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, p2}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 52
    iget p1, p0, Lcom/moji/mjweather/tabme/widget/BannerImageView;->a:F

    float-to-int p1, p1

    iget p2, p0, Lcom/moji/mjweather/tabme/widget/BannerImageView;->b:F

    float-to-int p2, p2

    invoke-virtual {p0, p1, p2}, Lcom/moji/mjweather/tabme/widget/BannerImageView;->setMeasuredDimension(II)V

    return-void
.end method
