.class public abstract Lcom/moji/mjad/common/view/creater/AbsAdCrystalViewCreater;
.super Lcom/moji/mjad/common/view/creater/AbsAdStyleViewCreater;
.source "AbsAdCrystalViewCreater.java"


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

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

    return-void
.end method


# virtual methods
.method public a(Lcom/moji/mjad/common/data/AdCommon;Ljava/lang/String;)V
    .locals 0

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

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

    return-void
.end method

.method public b(Lcom/moji/mjad/common/data/AdCommon;Ljava/lang/String;)V
    .locals 1

    if-eqz p1, :cond_1

    .line 29
    iget-object v0, p0, Lcom/moji/mjad/common/view/creater/AbsAdCrystalViewCreater;->q:Landroid/widget/RelativeLayout;

    if-eqz v0, :cond_1

    iget-object v0, p1, Lcom/moji/mjad/common/data/AdCommon;->crystalAd:Lcom/moji/mjad/third/CrystalAd;

    if-eqz v0, :cond_1

    iget-object v0, p1, Lcom/moji/mjad/common/data/AdCommon;->crystalAd:Lcom/moji/mjad/third/CrystalAd;

    invoke-virtual {v0}, Lcom/moji/mjad/third/CrystalAd;->d()Lcom/intowow/sdk/NativeAd$MediaView;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 30
    iget-object p2, p1, Lcom/moji/mjad/common/data/AdCommon;->crystalAd:Lcom/moji/mjad/third/CrystalAd;

    invoke-virtual {p2}, Lcom/moji/mjad/third/CrystalAd;->d()Lcom/intowow/sdk/NativeAd$MediaView;

    move-result-object p2

    invoke-virtual {p2}, Lcom/intowow/sdk/NativeAd$MediaView;->getParent()Landroid/view/ViewParent;

    move-result-object p2

    check-cast p2, Landroid/view/ViewGroup;

    if-eqz p2, :cond_0

    .line 32
    invoke-virtual {p2}, Landroid/view/ViewGroup;->removeAllViews()V

    .line 34
    :cond_0
    iget-object p2, p0, Lcom/moji/mjad/common/view/creater/AbsAdCrystalViewCreater;->q:Landroid/widget/RelativeLayout;

    invoke-virtual {p2}, Landroid/widget/RelativeLayout;->removeAllViews()V

    .line 35
    iget-object p2, p0, Lcom/moji/mjad/common/view/creater/AbsAdCrystalViewCreater;->q:Landroid/widget/RelativeLayout;

    iget-object p1, p1, Lcom/moji/mjad/common/data/AdCommon;->crystalAd:Lcom/moji/mjad/third/CrystalAd;

    invoke-virtual {p1}, Lcom/moji/mjad/third/CrystalAd;->d()Lcom/intowow/sdk/NativeAd$MediaView;

    move-result-object p1

    invoke-virtual {p2, p1}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    .line 36
    iget-object p1, p0, Lcom/moji/mjad/common/view/creater/AbsAdCrystalViewCreater;->B:Lcom/moji/mjad/common/listener/AdViewShownListener;

    if-eqz p1, :cond_2

    .line 37
    iget-object p1, p0, Lcom/moji/mjad/common/view/creater/AbsAdCrystalViewCreater;->B:Lcom/moji/mjad/common/listener/AdViewShownListener;

    invoke-interface {p1, p0}, Lcom/moji/mjad/common/listener/AdViewShownListener;->onAdViewVisible(Lcom/moji/mjad/common/view/creater/AbsAdStyleViewCreater;)V

    goto :goto_0

    .line 40
    :cond_1
    iget-object p1, p0, Lcom/moji/mjad/common/view/creater/AbsAdCrystalViewCreater;->B:Lcom/moji/mjad/common/listener/AdViewShownListener;

    if-eqz p1, :cond_2

    .line 41
    iget-object p1, p0, Lcom/moji/mjad/common/view/creater/AbsAdCrystalViewCreater;->B:Lcom/moji/mjad/common/listener/AdViewShownListener;

    sget-object v0, Lcom/moji/mjad/enumdata/MojiAdGoneType;->GONE_WITH_NORMAL:Lcom/moji/mjad/enumdata/MojiAdGoneType;

    invoke-interface {p1, v0, p2}, Lcom/moji/mjad/common/listener/AdViewShownListener;->onAdViewGone(Lcom/moji/mjad/enumdata/MojiAdGoneType;Ljava/lang/String;)V

    :cond_2
    :goto_0
    return-void
.end method
