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 5813ec48d..ce7812fe9 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,8 @@ package io.legado.app.ui.rss.read import android.annotation.SuppressLint import android.os.Bundle +import android.view.Menu +import android.view.MenuItem import android.webkit.WebSettings import android.webkit.WebViewClient import androidx.lifecycle.Observer @@ -23,6 +25,19 @@ class ReadRssActivity : VMBaseActivity(R.layout.activity_rss_r viewModel.initData(intent) } + override fun onCompatCreateOptionsMenu(menu: Menu): Boolean { + menuInflater.inflate(R.menu.rss_read, menu) + return super.onCompatCreateOptionsMenu(menu) + } + + override fun onCompatOptionsItemSelected(item: MenuItem): Boolean { + when (item.itemId) { + R.id.menu_rss_star -> { + } + } + return super.onCompatOptionsItemSelected(item) + } + private fun initWebView() { webView.webViewClient = WebViewClient() webView.settings.mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW diff --git a/app/src/main/res/menu/rss_read.xml b/app/src/main/res/menu/rss_read.xml new file mode 100644 index 000000000..de8867dd7 --- /dev/null +++ b/app/src/main/res/menu/rss_read.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file