package com.base.superfilemanager.activity

import android.annotation.SuppressLint
import android.graphics.Color
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.core.view.updatePadding
import com.blankj.utilcode.util.BarUtils
import com.base.superfilemanager.databinding.ActivityLayoutWebPrivacyBinding
import com.base.superfilemanager.helps.BaseActivity

class PrivacyWebActivity : BaseActivity<ActivityLayoutWebPrivacyBinding>() {


    override val binding: ActivityLayoutWebPrivacyBinding by lazy {
        ActivityLayoutWebPrivacyBinding.inflate(layoutInflater)
    }

    @SuppressLint("SetJavaScriptEnabled")
    override fun initView() {
        BarUtils.setStatusBarLightMode(this, true)
        BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
        binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
        binding.idWeb.settings.setJavaScriptEnabled(true)

        binding.idWeb.webViewClient = object : WebViewClient() {
            override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean {
                view?.loadUrl(url!!)
                return true
            }
        }
        binding.idWeb.loadUrl("https://sites.google.com/view/cleanmastermax/home")
        binding.idBack.setOnClickListener {
            finishToMain()
        }
    }


}