From ac773c87494111e2cb077f197d039d945879f607 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 11 Oct 2019 14:57:58 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/rss/read/ReadRssActivity.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 {