修复登陆界面部分网页按钮无反应问题

pull/2077/head
kunfei 2 years ago
parent 0d09f5df93
commit b8f7ae703a
  1. 5
      app/src/main/java/io/legado/app/ui/login/WebViewLoginFragment.kt

@ -7,6 +7,7 @@ import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import android.webkit.CookieManager import android.webkit.CookieManager
import android.webkit.WebSettings
import android.webkit.WebView import android.webkit.WebView
import android.webkit.WebViewClient import android.webkit.WebViewClient
import androidx.fragment.app.activityViewModels import androidx.fragment.app.activityViewModels
@ -57,6 +58,10 @@ class WebViewLoginFragment : BaseFragment(R.layout.fragment_web_view_login) {
@SuppressLint("SetJavaScriptEnabled") @SuppressLint("SetJavaScriptEnabled")
private fun initWebView(source: BaseSource) { private fun initWebView(source: BaseSource) {
binding.webView.settings.apply { binding.webView.settings.apply {
mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
domStorageEnabled = true
useWideViewPort = true
loadWithOverviewMode = true
builtInZoomControls = true builtInZoomControls = true
javaScriptEnabled = true javaScriptEnabled = true
source.getHeaderMap()[AppConst.UA_NAME]?.let { source.getHeaderMap()[AppConst.UA_NAME]?.let {

Loading…
Cancel
Save