详情页添加拷贝url

pull/461/head
gedoor 4 years ago
parent 1d52e88810
commit e92a2ada98
  1. 3
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
  2. 5
      app/src/main/res/menu/book_info.xml
  3. 2
      app/src/main/res/values-zh-rHK/strings.xml
  4. 2
      app/src/main/res/values-zh-rTW/strings.xml
  5. 2
      app/src/main/res/values-zh/strings.xml
  6. 2
      app/src/main/res/values/strings.xml

@ -106,6 +106,9 @@ class BookInfoActivity :
viewModel.loadBookInfo(it, false) viewModel.loadBookInfo(it, false)
} }
} }
R.id.menu_copy_url -> viewModel.bookData.value?.bookUrl?.let {
sendToClip(it)
} ?: toast(R.string.no_book)
R.id.menu_can_update -> { R.id.menu_can_update -> {
if (viewModel.inBookshelf) { if (viewModel.inBookshelf) {
viewModel.bookData.value?.let { viewModel.bookData.value?.let {

@ -19,6 +19,11 @@
android:title="@string/refresh" android:title="@string/refresh"
app:showAsAction="never" /> app:showAsAction="never" />
<item
android:id="@+id/menu_copy_url"
android:title="@string/copy_url"
app:showAsAction="never" />
<item <item
android:id="@+id/menu_can_update" android:id="@+id/menu_can_update"
android:title="@string/allow_update" android:title="@string/allow_update"

@ -778,5 +778,7 @@
<string name="style_name">样式名称:</string> <string name="style_name">样式名称:</string>
<string name="empty_msg_import_book">点击右上角文件夹图标,选择文件夹</string> <string name="empty_msg_import_book">点击右上角文件夹图标,选择文件夹</string>
<string name="scan_folder">智能扫描</string> <string name="scan_folder">智能扫描</string>
<string name="copy_url">拷贝URL</string>
<string name="no_book">没有书籍</string>
</resources> </resources>

@ -778,5 +778,7 @@
<string name="style_name">样式名称:</string> <string name="style_name">样式名称:</string>
<string name="empty_msg_import_book">点击右上角文件夹图标,选择文件夹</string> <string name="empty_msg_import_book">点击右上角文件夹图标,选择文件夹</string>
<string name="scan_folder">智能扫描</string> <string name="scan_folder">智能扫描</string>
<string name="copy_url">拷贝URL</string>
<string name="no_book">没有书籍</string>
</resources> </resources>

@ -781,5 +781,7 @@
<string name="style_name">样式名称:</string> <string name="style_name">样式名称:</string>
<string name="empty_msg_import_book">点击右上角文件夹图标,选择文件夹</string> <string name="empty_msg_import_book">点击右上角文件夹图标,选择文件夹</string>
<string name="scan_folder">智能扫描</string> <string name="scan_folder">智能扫描</string>
<string name="copy_url">拷贝URL</string>
<string name="no_book">没有书籍</string>
</resources> </resources>

@ -784,5 +784,7 @@
<string name="style_name">样式名称:</string> <string name="style_name">样式名称:</string>
<string name="empty_msg_import_book">点击右上角文件夹图标,选择文件夹</string> <string name="empty_msg_import_book">点击右上角文件夹图标,选择文件夹</string>
<string name="scan_folder">智能扫描</string> <string name="scan_folder">智能扫描</string>
<string name="copy_url">拷贝URL</string>
<string name="no_book">没有书籍</string>
</resources> </resources>

Loading…
Cancel
Save