diff --git a/app/src/main/java/io/legado/app/ui/download/DownloadActivity.kt b/app/src/main/java/io/legado/app/ui/download/DownloadActivity.kt index 633d38ca9..ccf7facb0 100644 --- a/app/src/main/java/io/legado/app/ui/download/DownloadActivity.kt +++ b/app/src/main/java/io/legado/app/ui/download/DownloadActivity.kt @@ -1,6 +1,8 @@ package io.legado.app.ui.download import android.os.Bundle +import android.view.Menu +import android.view.MenuItem import androidx.lifecycle.LiveData import androidx.lifecycle.Observer import androidx.recyclerview.widget.LinearLayoutManager @@ -21,6 +23,18 @@ class DownloadActivity : BaseActivity(R.layout.activity_download) { 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() { recycler_view.layoutManager = LinearLayoutManager(this) adapter = DownloadAdapter(this) diff --git a/app/src/main/res/menu/download.xml b/app/src/main/res/menu/download.xml new file mode 100644 index 000000000..e73b6af79 --- /dev/null +++ b/app/src/main/res/menu/download.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file