diff --git a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt index f5f8a2d98..40419697a 100644 --- a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt @@ -2,6 +2,7 @@ package io.legado.app.ui.rss.read import android.annotation.SuppressLint import android.os.Bundle +import android.webkit.WebSettings import android.webkit.WebViewClient import androidx.lifecycle.Observer import io.legado.app.R @@ -17,11 +18,16 @@ class ReadRssActivity : VMBaseActivity(R.layout.activity_rss_r override fun onActivityCreated(savedInstanceState: Bundle?) { title = intent.getStringExtra("title") - webView.webViewClient = WebViewClient() + initWebView() initLiveData() viewModel.initData(intent) } + private fun initWebView() { + webView.webViewClient = WebViewClient() + webView.settings.mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW + } + @SuppressLint("SetJavaScriptEnabled") private fun initLiveData() { viewModel.rssSourceLiveData.observe(this, Observer {