pull/37/head
kunfei 5 years ago
parent 9172f53ee9
commit eb180060ef
  1. 15
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt
  2. 11
      app/src/main/res/menu/rss_read.xml

@ -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<ReadRssViewModel>(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

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_rss_star"
android:title="@string/store_up"
android:icon="@drawable/ic_star"
app:showAsAction="always" />
</menu>
Loading…
Cancel
Save