import android.os.Bundle
import com.easy.clean.R
import com.easy.clean.base.BaseFragment
import com.easy.clean.business.ads.AdsMgr
import com.easy.clean.databinding.FragmentNativeFullBinding
import com.easy.clean.ui.guide.GuideActivity


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


    override fun initListener() {
        super.initListener()

        binding.ivClose.setOnClickListener {
            val activity = requireActivity() as GuideActivity?
            activity?.binding?.viewpager2?.currentItem = 3
        }
    }

    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)
        }
    }

}