pull/34/head
kunfei 5 years ago
parent 288cf8603f
commit a33042eda9
  1. 16
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt
  2. 4
      app/src/main/res/menu/rss_source.xml

@ -1,6 +1,8 @@
package io.legado.app.ui.rss.source.manage
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import androidx.appcompat.widget.SearchView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.DividerItemDecoration
@ -15,6 +17,7 @@ import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.utils.getViewModel
import kotlinx.android.synthetic.main.activity_rss_source.*
import kotlinx.android.synthetic.main.view_search.*
import kotlinx.android.synthetic.main.view_title_bar.*
class RssSourceActivity : VMBaseActivity<RssSourceViewModel>(R.layout.activity_rss_source),
@ -26,10 +29,23 @@ class RssSourceActivity : VMBaseActivity<RssSourceViewModel>(R.layout.activity_r
private lateinit var adapter: RssSourceAdapter
override fun onActivityCreated(savedInstanceState: Bundle?) {
setSupportActionBar(toolbar)
initRecyclerView()
initSearchView()
}
override fun onCompatCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.rss_source, menu)
return super.onCompatCreateOptionsMenu(menu)
}
override fun onCompatOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
}
return super.onCompatOptionsItemSelected(item)
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(recycler_view)
recycler_view.layoutManager = LinearLayoutManager(this)

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<menu>
</menu>
Loading…
Cancel
Save