导入书源清单加入全不选

pull/352/head
gedoor 4 years ago
parent e6bc38b3bb
commit 659aec8460
  1. 8
      app/src/main/java/io/legado/app/ui/association/ImportBookSourceActivity.kt
  2. 8
      app/src/main/java/io/legado/app/ui/association/ImportRssSourceActivity.kt
  3. 11
      app/src/main/res/menu/import_source.xml
  4. 1
      app/src/main/res/values-zh-rHK/strings.xml
  5. 1
      app/src/main/res/values-zh-rTW/strings.xml
  6. 1
      app/src/main/res/values-zh/strings.xml
  7. 1
      app/src/main/res/values/strings.xml

@ -173,6 +173,14 @@ class ImportBookSourceActivity : VMBaseActivity<ImportBookSourceViewModel>(
}
adapter.notifyDataSetChanged()
}
R.id.menu_un_select_all -> {
adapter.selectStatus.forEachIndexed { index, b ->
if (b) {
adapter.selectStatus[index] = false
}
}
adapter.notifyDataSetChanged()
}
}
return false
}

@ -173,6 +173,14 @@ class ImportRssSourceActivity : VMBaseActivity<ImportRssSourceViewModel>(
}
adapter.notifyDataSetChanged()
}
R.id.menu_un_select_all -> {
adapter.selectStatus.forEachIndexed { index, b ->
if (b) {
adapter.selectStatus[index] = false
}
}
adapter.notifyDataSetChanged()
}
}
return false
}

@ -1,10 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
<menu xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_select_all"
android:title="@string/select_all"
app:showAsAction="always" />
app:showAsAction="always"
tools:ignore="AlwaysShowAction" />
<item
android:id="@+id/menu_un_select_all"
android:title="@string/un_select_all"
app:showAsAction="never" />
</menu>

@ -752,4 +752,5 @@
<string name="local_tts">本地TTS</string>
<string name="thread_count">线程数</string>
<string name="all_read_time">总阅读时间</string>
<string name="un_select_all">全不选</string>
</resources>

@ -752,5 +752,6 @@
<string name="local_tts">本地TTS</string>
<string name="thread_count">线程数</string>
<string name="all_read_time">总阅读时间</string>
<string name="un_select_all">全不选</string>
</resources>

@ -752,4 +752,5 @@
<string name="local_tts">本地TTS</string>
<string name="thread_count">线程数</string>
<string name="all_read_time">总阅读时间</string>
<string name="un_select_all">全不选</string>
</resources>

@ -753,5 +753,6 @@
<string name="local_tts">本地TTS</string>
<string name="thread_count">线程数</string>
<string name="all_read_time">总阅读时间</string>
<string name="un_select_all">全不选</string>
</resources>
Loading…
Cancel
Save