pull/32/head
kunfei 5 years ago
parent dc0842f516
commit 3c78f855f6
  1. 14
      app/src/main/java/io/legado/app/ui/bookinfo/BookInfoEditActivity.kt
  2. 2
      app/src/main/res/layout/activity_book_info_edit.xml
  3. 11
      app/src/main/res/menu/book_info_edit.xml
  4. 1
      app/src/main/res/values/strings.xml

@ -1,6 +1,8 @@
package io.legado.app.ui.bookinfo
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import io.legado.app.R
import io.legado.app.base.VMBaseActivity
import io.legado.app.utils.getViewModel
@ -13,4 +15,16 @@ class BookInfoEditActivity : VMBaseActivity<BookInfoViewModel>(R.layout.activity
}
override fun onCompatCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.book_info_edit, menu)
return super.onCompatCreateOptionsMenu(menu)
}
override fun onCompatOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.action_save -> {
}
}
return super.onCompatOptionsItemSelected(item)
}
}

@ -10,7 +10,7 @@
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/book_info" />
app:title="@string/book_info_edit" />
<ScrollView
android:layout_width="match_parent"

@ -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/action_save"
android:icon="@drawable/ic_save"
android:title="@string/action_save"
app:showAsAction="ifRoom" />
</menu>

@ -286,6 +286,7 @@
<string name="auto_next_page_stop">停止自动翻页</string>
<string name="auto_next_page_speed">自动翻页间隔</string>
<string name="book_info">书籍信息</string>
<string name="book_info_edit">书籍信息编辑</string>
<string name="ps_default_read">默认打开书架</string>
<string name="pt_default_read">自动跳转最近阅读</string>
<string name="use_to">替换范围,选填书名或者源名</string>

Loading…
Cancel
Save