package com.zj365.mime.fragment

import android.webkit.WebView
import android.webkit.WebViewClient
import com.xty.base.fragment.IBaseFrag
import com.zj365.mime.databinding.FragScoreRuleBinding




class ScoreRuleFrag : IBaseFrag() {
    val binding by lazy { FragScoreRuleBinding.inflate(layoutInflater)}
    override fun setLayout()=binding.root
    override fun initView() {
        super.initView()
       setWeb()
        binding.mRule.loadUrl("file:///android_asset/word_rule.html")
    }

    private fun setWeb() {
        binding.mRule.webViewClient = webViewClient
    }


    private val webViewClient: WebViewClient = object : WebViewClient() {
        override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
            view.loadUrl(url)
            return true
        }


    }


}

