package com.composition.android.ad.admob.load.view

import android.annotation.SuppressLint
import android.content.Context
import com.composition.android.lib.ad.basic.BasicAdView
import com.google.android.gms.ads.AdView

/**
 * @classname:
 * @author: LiuXiaoLong
 * @date: 2022/9/6
 * description:Admob横幅广告
 */
@SuppressLint("ViewConstructor")
class AdmobBannerView(context: Context?) : BasicAdView<AdView>(context) {

    override fun adContentView(): AdView? {
        return adResult?.adObject as? AdView
    }

    override fun onResume() {
        adView?.resume()
    }

    override fun onPause() {
        adView?.pause()
    }

    override fun onDestroy() {
        adView?.pause()
        adView?.destroy()
    }

}