import com.ritoq.quickphone.R
import com.ritoq.quickphone.base.BaseFragment
import com.ritoq.quickphone.business.ads.AdsMgr
import com.ritoq.quickphone.databinding.FragmentNativeFullBinding
import com.ritoq.quickphone.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)
        }


    }


}