TPNativeBanner.smali
.class public Lcom/tradplus/ads/open/nativead/TPNativeBanner;
.super Landroid/widget/FrameLayout;
# instance fields
.field private a:Lcom/tradplus/ads/open/banner/BannerAdListener;
.field private b:Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;
.field private c:Lcom/tradplus/ads/open/nativead/TPNativeAdRender;
.field private d:Z
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.registers 2
invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
const/4 p1, 0x0
iput-boolean p1, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->d:Z
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.registers 3
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
const/4 p1, 0x0
iput-boolean p1, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->d:Z
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.registers 4
invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
const/4 p1, 0x0
iput-boolean p1, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->d:Z
return-void
.end method
# virtual methods
.method public closeAutoShow()V
.registers 2
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->d:Z
return-void
.end method
.method public getBannerAd()Lcom/tradplus/ads/base/bean/TPBaseAd;
.registers 2
iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->b:Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;
if-eqz v0, :cond_9
invoke-virtual {v0}, Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;->getBannerAd()Lcom/tradplus/ads/base/bean/TPBaseAd;
move-result-object v0
return-object v0
:cond_9
const/4 v0, 0x0
return-object v0
.end method
.method public getNativeAdRender()Lcom/tradplus/ads/open/nativead/TPNativeAdRender;
.registers 2
iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->c:Lcom/tradplus/ads/open/nativead/TPNativeAdRender;
return-object v0
.end method
.method public loadAd(Ljava/lang/String;)V
.registers 4
new-instance v0, Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
move-result-object v1
invoke-direct {v0, v1, p1, p0}, Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;-><init>(Landroid/content/Context;Ljava/lang/String;Landroid/widget/FrameLayout;)V
iput-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->b:Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;
iget-object p1, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->b:Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;
iget-boolean v0, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->d:Z
iget-object v1, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->a:Lcom/tradplus/ads/open/banner/BannerAdListener;
invoke-virtual {p1, v0, v1}, Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;->loadAd(ZLcom/tradplus/ads/open/banner/BannerAdListener;)V
return-void
.end method
.method protected onDetachedFromWindow()V
.registers 2
invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V
iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->b:Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;
if-eqz v0, :cond_a
invoke-virtual {v0}, Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;->onDestroy()V
:cond_a
return-void
.end method
.method protected onWindowVisibilityChanged(I)V
.registers 3
invoke-super {p0, p1}, Landroid/widget/FrameLayout;->onWindowVisibilityChanged(I)V
iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->b:Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;
if-nez v0, :cond_8
return-void
:cond_8
if-nez p1, :cond_e
invoke-virtual {v0}, Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;->startRefreshAd()V
return-void
:cond_e
invoke-virtual {v0}, Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;->stopRefreshAd()V
return-void
.end method
.method public setAdListener(Lcom/tradplus/ads/open/banner/BannerAdListener;)V
.registers 3
iput-object p1, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->a:Lcom/tradplus/ads/open/banner/BannerAdListener;
iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->b:Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;
if-eqz v0, :cond_9
invoke-virtual {v0, p1}, Lcom/tradplus/ads/mgr/nativead/NativeBannerMgr;->setAdListener(Lcom/tradplus/ads/open/banner/BannerAdListener;)V
:cond_9
return-void
.end method
.method public setNativeAdRender(Lcom/tradplus/ads/open/nativead/TPNativeAdRender;)V
.registers 2
iput-object p1, p0, Lcom/tradplus/ads/open/nativead/TPNativeBanner;->c:Lcom/tradplus/ads/open/nativead/TPNativeAdRender;
return-void
.end method
.method public setVisibility(I)V
.registers 2
invoke-super {p0, p1}, Landroid/widget/FrameLayout;->setVisibility(I)V
return-void
.end method