pull/63/head
kunfei 5 years ago
parent 4d3c757f13
commit 4126bf8f16
  1. 14
      app/src/main/java/io/legado/app/ui/download/DownloadActivity.kt
  2. 4
      app/src/main/res/menu/download.xml

@ -1,6 +1,8 @@
package io.legado.app.ui.download package io.legado.app.ui.download
import android.os.Bundle import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import androidx.lifecycle.LiveData import androidx.lifecycle.LiveData
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
@ -21,6 +23,18 @@ class DownloadActivity : BaseActivity(R.layout.activity_download) {
initLiveData() initLiveData()
} }
override fun onCompatCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.download, menu)
return super.onCompatCreateOptionsMenu(menu)
}
override fun onCompatOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
}
return super.onCompatOptionsItemSelected(item)
}
private fun initRecyclerView() { private fun initRecyclerView() {
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
adapter = DownloadAdapter(this) adapter = DownloadAdapter(this)

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