.class public Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;
.super Lcom/moji/mjad/common/view/creater/AbsAdImageViewCreater;
.source "AdStyleLiveOneCreater.java"


# instance fields
.field private c:Landroid/widget/RelativeLayout;


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

    .line 28
    invoke-direct {p0, p1}, Lcom/moji/mjad/common/view/creater/AbsAdImageViewCreater;-><init>(Landroid/content/Context;)V

    return-void
.end method


# virtual methods
.method public synthetic a(Ljava/lang/Object;Ljava/lang/String;)Landroid/view/View;
    .locals 0

    .line 20
    check-cast p1, Lcom/moji/mjad/common/data/AdCommon;

    invoke-virtual {p0, p1, p2}, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->g(Lcom/moji/mjad/common/data/AdCommon;Ljava/lang/String;)Landroid/view/View;

    move-result-object p1

    return-object p1
.end method

.method protected a(Landroid/view/View;)V
    .locals 4

    .line 33
    sget v0, Lcom/moji/mjad/R$id;->iv_moji_ad_icon:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/moji/mjad/view/AdTagView;

    iput-object v0, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->o:Lcom/moji/mjad/view/AdTagView;

    .line 34
    sget v0, Lcom/moji/mjad/R$id;->iv_moji_ad_pic:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->p:Landroid/widget/ImageView;

    .line 35
    sget v0, Lcom/moji/mjad/R$id;->rl_moji_ad_pic:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout;

    iput-object v0, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->q:Landroid/widget/RelativeLayout;

    .line 36
    sget v0, Lcom/moji/mjad/R$id;->iv_moji_ad_close:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->u:Landroid/widget/ImageView;

    .line 37
    sget v0, Lcom/moji/mjad/R$id;->rl_moji_ad:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout;

    iput-object v0, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->c:Landroid/widget/RelativeLayout;

    .line 38
    sget v0, Lcom/moji/mjad/R$id;->abs_ad_mask_view:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Lcom/moji/mjad/view/AdCommonMaskView;

    iput-object p1, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->v:Lcom/moji/mjad/view/IAbstractMask;

    .line 39
    new-instance p1, Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v0, -0x1

    const/4 v1, -0x2

    invoke-direct {p1, v0, v1}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 40
    sget v0, Lcom/moji/mjad/R$dimen;->moji_article_ad_margin_left:I

    invoke-virtual {p0, v0}, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->c(I)F

    move-result v0

    float-to-int v0, v0

    sget v1, Lcom/moji/mjad/R$dimen;->_5dp:I

    .line 41
    invoke-virtual {p0, v1}, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->c(I)F

    move-result v1

    float-to-int v1, v1

    sget v2, Lcom/moji/mjad/R$dimen;->moji_article_ad_margin_left:I

    invoke-virtual {p0, v2}, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->c(I)F

    move-result v2

    float-to-int v2, v2

    sget v3, Lcom/moji/mjad/R$dimen;->_5dp:I

    invoke-virtual {p0, v3}, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->c(I)F

    move-result v3

    float-to-int v3, v3

    .line 40
    invoke-virtual {p1, v0, v1, v2, v3}, Landroid/widget/RelativeLayout$LayoutParams;->setMargins(IIII)V

    .line 42
    iget-object v0, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->c:Landroid/widget/RelativeLayout;

    invoke-virtual {v0, p1}, Landroid/widget/RelativeLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    return-void
.end method

.method public g(Lcom/moji/mjad/common/data/AdCommon;Ljava/lang/String;)Landroid/view/View;
    .locals 3

    .line 47
    sget v0, Lcom/moji/mjad/R$layout;->moji_article_ad_style_one:I

    invoke-virtual {p0, v0}, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->a(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->n:Landroid/view/View;

    .line 48
    invoke-virtual {p0}, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->a()I

    move-result v0

    int-to-float v0, v0

    sget v1, Lcom/moji/mjad/R$dimen;->moji_article_ad_margin_left:I

    invoke-virtual {p0, v1}, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->c(I)F

    move-result v1

    const/high16 v2, 0x40000000    # 2.0f

    mul-float v1, v1, v2

    sub-float/2addr v0, v1

    float-to-int v0, v0

    iput v0, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->j:I

    .line 49
    invoke-virtual {p0}, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->a()I

    move-result v0

    iput v0, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->j:I

    .line 50
    iget-object v0, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->n:Landroid/view/View;

    invoke-virtual {p0, v0}, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->a(Landroid/view/View;)V

    .line 51
    invoke-virtual {p0, p1, p2}, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->a(Lcom/moji/mjad/common/data/AdCommon;Ljava/lang/String;)V

    .line 52
    iget-object p2, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->u:Landroid/widget/ImageView;

    invoke-static {p1, p2}, Lcom/moji/mjad/util/AdUtil;->a(Lcom/moji/mjad/common/data/AdCommon;Landroid/widget/ImageView;)V

    .line 53
    iget-object p1, p0, Lcom/moji/mjad/common/view/creater/style/AdStyleLiveOneCreater;->n:Landroid/view/View;

    return-object p1
.end method
