import com.base.appzxhy.R
import com.base.appzxhy.base.BaseFragment
import com.base.appzxhy.business.ads.AdsMgr
import com.base.appzxhy.databinding.FragmentNativeFullBinding
import com.base.appzxhy.ui.guide.GuideActivity


class NativeFullFragment : BaseFragment<FragmentNativeFullBinding>(FragmentNativeFullBinding::inflate) {

    var page: Int = 2

    override fun onResume() {
        super.onResume()

        if (!binding.flAd.isAdShowed) {
//            binding.flAd.adGravity = android.view.Gravity.BOTTOM or android.view.Gravity.CENTER_HORIZONTAL
            AdsMgr.showNative(binding.flAd, R.layout.layout_admob_native_full)
        }
    }

    override fun initListener() {
        super.initListener()

        binding.ivClose.setOnClickListener {
            val activity = requireActivity() as GuideActivity
            activity.next(page)
        }


    }


}