优化
This commit is contained in:
@@ -284,6 +284,11 @@
|
|||||||
android:name=".ui.about.ReadRecordActivity"
|
android:name=".ui.about.ReadRecordActivity"
|
||||||
android:configChanges="orientation|screenSize"
|
android:configChanges="orientation|screenSize"
|
||||||
android:hardwareAccelerated="true" />
|
android:hardwareAccelerated="true" />
|
||||||
|
<!-- 字典管理 -->
|
||||||
|
<activity
|
||||||
|
android:name=".ui.dict.rule.DictRuleActivity"
|
||||||
|
android:configChanges="orientation|screenSize"
|
||||||
|
android:hardwareAccelerated="true" />
|
||||||
<!-- 选择文件 -->
|
<!-- 选择文件 -->
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.document.HandleFileActivity"
|
android:name=".ui.document.HandleFileActivity"
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ import kotlinx.coroutines.flow.Flow
|
|||||||
@Dao
|
@Dao
|
||||||
interface DictRuleDao {
|
interface DictRuleDao {
|
||||||
|
|
||||||
@get:Query("select * from dictRules")
|
@get:Query("select * from dictRules order by sortNumber")
|
||||||
val all: List<DictRule>
|
val all: List<DictRule>
|
||||||
|
|
||||||
@get:Query("select * from dictRules where enabled = 1")
|
@get:Query("select * from dictRules where enabled = 1 order by sortNumber")
|
||||||
val enabled: List<DictRule>
|
val enabled: List<DictRule>
|
||||||
|
|
||||||
@Query("select * from dictRules where enabled = 1")
|
@Query("select * from dictRules where enabled = 1 order by sortNumber")
|
||||||
fun flowAll(): Flow<List<DictRule>>
|
fun flowAll(): Flow<List<DictRule>>
|
||||||
|
|
||||||
@Upsert
|
@Upsert
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import io.legado.app.model.analyzeRule.AnalyzeUrl
|
|||||||
@Entity(tableName = "dictRules")
|
@Entity(tableName = "dictRules")
|
||||||
data class DictRule(
|
data class DictRule(
|
||||||
@PrimaryKey
|
@PrimaryKey
|
||||||
val name: String,
|
var name: String,
|
||||||
var urlRule: String,
|
var urlRule: String,
|
||||||
var showRule: String,
|
var showRule: String,
|
||||||
@ColumnInfo(defaultValue = "1")
|
@ColumnInfo(defaultValue = "1")
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package io.legado.app.ui.dict.rule
|
package io.legado.app.ui.dict.rule
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import androidx.activity.viewModels
|
import androidx.activity.viewModels
|
||||||
import androidx.appcompat.widget.PopupMenu
|
import androidx.appcompat.widget.PopupMenu
|
||||||
@@ -36,6 +37,11 @@ class DictRuleActivity : VMBaseActivity<ActivityDictRuleBinding, DictRuleViewMod
|
|||||||
observeDictRuleData()
|
observeDictRuleData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onCompatCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
|
menuInflater.inflate(R.menu.dict_rule, menu)
|
||||||
|
return super.onCompatCreateOptionsMenu(menu)
|
||||||
|
}
|
||||||
|
|
||||||
private fun initRecyclerView() {
|
private fun initRecyclerView() {
|
||||||
binding.recyclerView.setEdgeEffectColor(primaryColor)
|
binding.recyclerView.setEdgeEffectColor(primaryColor)
|
||||||
binding.recyclerView.layoutManager = LinearLayoutManager(this)
|
binding.recyclerView.layoutManager = LinearLayoutManager(this)
|
||||||
@@ -53,6 +59,7 @@ class DictRuleActivity : VMBaseActivity<ActivityDictRuleBinding, DictRuleViewMod
|
|||||||
ItemTouchHelper(itemTouchCallback).attachToRecyclerView(binding.recyclerView)
|
ItemTouchHelper(itemTouchCallback).attachToRecyclerView(binding.recyclerView)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun initSelectActionView() {
|
private fun initSelectActionView() {
|
||||||
binding.selectActionBar.setMainActionText(R.string.delete)
|
binding.selectActionBar.setMainActionText(R.string.delete)
|
||||||
binding.selectActionBar.inflateMenu(R.menu.replace_rule_sel)
|
binding.selectActionBar.inflateMenu(R.menu.replace_rule_sel)
|
||||||
@@ -68,12 +75,11 @@ class DictRuleActivity : VMBaseActivity<ActivityDictRuleBinding, DictRuleViewMod
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun selectAll(selectAll: Boolean) {
|
override fun onContextItemSelected(item: MenuItem): Boolean {
|
||||||
adapter.selectAll()
|
when (item.itemId) {
|
||||||
|
R.id.menu_create -> {}
|
||||||
}
|
}
|
||||||
|
return super.onContextItemSelected(item)
|
||||||
override fun revertSelection() {
|
|
||||||
adapter.revertSelection()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onMenuItemClick(item: MenuItem): Boolean {
|
override fun onMenuItemClick(item: MenuItem): Boolean {
|
||||||
@@ -83,6 +89,18 @@ class DictRuleActivity : VMBaseActivity<ActivityDictRuleBinding, DictRuleViewMod
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun selectAll(selectAll: Boolean) {
|
||||||
|
if (selectAll) {
|
||||||
|
adapter.revertSelection()
|
||||||
|
} else {
|
||||||
|
adapter.selectAll()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun revertSelection() {
|
||||||
|
adapter.revertSelection()
|
||||||
|
}
|
||||||
|
|
||||||
override fun update(vararg rule: DictRule) {
|
override fun update(vararg rule: DictRule) {
|
||||||
viewModel.upsert(*rule)
|
viewModel.upsert(*rule)
|
||||||
}
|
}
|
||||||
@@ -92,19 +110,11 @@ class DictRuleActivity : VMBaseActivity<ActivityDictRuleBinding, DictRuleViewMod
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun edit(rule: DictRule) {
|
override fun edit(rule: DictRule) {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun toTop(rule: DictRule) {
|
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun toBottom(rule: DictRule) {
|
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun upOrder() {
|
override fun upOrder() {
|
||||||
TODO("Not yet implemented")
|
viewModel.upSortNumber()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun upCountView() {
|
override fun upCountView() {
|
||||||
|
|||||||
@@ -2,17 +2,14 @@ package io.legado.app.ui.dict.rule
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.PopupMenu
|
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import androidx.recyclerview.widget.DiffUtil
|
import androidx.recyclerview.widget.DiffUtil
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import io.legado.app.R
|
|
||||||
import io.legado.app.base.adapter.ItemViewHolder
|
import io.legado.app.base.adapter.ItemViewHolder
|
||||||
import io.legado.app.base.adapter.RecyclerAdapter
|
import io.legado.app.base.adapter.RecyclerAdapter
|
||||||
import io.legado.app.data.entities.DictRule
|
import io.legado.app.data.entities.DictRule
|
||||||
import io.legado.app.databinding.ItemReplaceRuleBinding
|
import io.legado.app.databinding.ItemDictRuleBinding
|
||||||
import io.legado.app.lib.theme.backgroundColor
|
import io.legado.app.lib.theme.backgroundColor
|
||||||
import io.legado.app.ui.widget.recycler.DragSelectTouchHelper
|
import io.legado.app.ui.widget.recycler.DragSelectTouchHelper
|
||||||
import io.legado.app.ui.widget.recycler.ItemTouchCallback
|
import io.legado.app.ui.widget.recycler.ItemTouchCallback
|
||||||
@@ -20,7 +17,7 @@ import io.legado.app.utils.ColorUtils
|
|||||||
|
|
||||||
|
|
||||||
class DictRuleAdapter(context: Context, var callBack: CallBack) :
|
class DictRuleAdapter(context: Context, var callBack: CallBack) :
|
||||||
RecyclerAdapter<DictRule, ItemReplaceRuleBinding>(context),
|
RecyclerAdapter<DictRule, ItemDictRuleBinding>(context),
|
||||||
ItemTouchCallback.Callback {
|
ItemTouchCallback.Callback {
|
||||||
|
|
||||||
private val selected = linkedSetOf<DictRule>()
|
private val selected = linkedSetOf<DictRule>()
|
||||||
@@ -83,8 +80,8 @@ class DictRuleAdapter(context: Context, var callBack: CallBack) :
|
|||||||
callBack.upCountView()
|
callBack.upCountView()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getViewBinding(parent: ViewGroup): ItemReplaceRuleBinding {
|
override fun getViewBinding(parent: ViewGroup): ItemDictRuleBinding {
|
||||||
return ItemReplaceRuleBinding.inflate(inflater, parent, false)
|
return ItemDictRuleBinding.inflate(inflater, parent, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCurrentListChanged() {
|
override fun onCurrentListChanged() {
|
||||||
@@ -93,7 +90,7 @@ class DictRuleAdapter(context: Context, var callBack: CallBack) :
|
|||||||
|
|
||||||
override fun convert(
|
override fun convert(
|
||||||
holder: ItemViewHolder,
|
holder: ItemViewHolder,
|
||||||
binding: ItemReplaceRuleBinding,
|
binding: ItemDictRuleBinding,
|
||||||
item: DictRule,
|
item: DictRule,
|
||||||
payloads: MutableList<Any>
|
payloads: MutableList<Any>
|
||||||
) {
|
) {
|
||||||
@@ -116,7 +113,7 @@ class DictRuleAdapter(context: Context, var callBack: CallBack) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun registerListener(holder: ItemViewHolder, binding: ItemReplaceRuleBinding) {
|
override fun registerListener(holder: ItemViewHolder, binding: ItemDictRuleBinding) {
|
||||||
binding.apply {
|
binding.apply {
|
||||||
swtEnabled.setOnCheckedChangeListener { buttonView, isChecked ->
|
swtEnabled.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||||
if (buttonView.isPressed) {
|
if (buttonView.isPressed) {
|
||||||
@@ -126,11 +123,6 @@ class DictRuleAdapter(context: Context, var callBack: CallBack) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ivEdit.setOnClickListener {
|
|
||||||
getItem(holder.layoutPosition)?.let {
|
|
||||||
callBack.edit(it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cbName.setOnClickListener {
|
cbName.setOnClickListener {
|
||||||
getItem(holder.layoutPosition)?.let {
|
getItem(holder.layoutPosition)?.let {
|
||||||
if (cbName.isChecked) {
|
if (cbName.isChecked) {
|
||||||
@@ -141,25 +133,17 @@ class DictRuleAdapter(context: Context, var callBack: CallBack) :
|
|||||||
}
|
}
|
||||||
callBack.upCountView()
|
callBack.upCountView()
|
||||||
}
|
}
|
||||||
ivMenuMore.setOnClickListener {
|
ivEdit.setOnClickListener {
|
||||||
showMenu(ivMenuMore, holder.layoutPosition)
|
getItem(holder.layoutPosition)?.let {
|
||||||
|
callBack.edit(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ivDelete.setOnClickListener {
|
||||||
|
getItem(holder.layoutPosition)?.let {
|
||||||
|
callBack.delete(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showMenu(view: View, position: Int) {
|
|
||||||
val item = getItem(position) ?: return
|
|
||||||
val popupMenu = PopupMenu(context, view)
|
|
||||||
popupMenu.inflate(R.menu.replace_rule_item)
|
|
||||||
popupMenu.setOnMenuItemClickListener { menuItem ->
|
|
||||||
when (menuItem.itemId) {
|
|
||||||
R.id.menu_top -> callBack.toTop(item)
|
|
||||||
R.id.menu_bottom -> callBack.toBottom(item)
|
|
||||||
R.id.menu_del -> callBack.delete(item)
|
|
||||||
}
|
|
||||||
true
|
|
||||||
}
|
|
||||||
popupMenu.show()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun swap(srcPosition: Int, targetPosition: Int): Boolean {
|
override fun swap(srcPosition: Int, targetPosition: Int): Boolean {
|
||||||
@@ -218,8 +202,6 @@ class DictRuleAdapter(context: Context, var callBack: CallBack) :
|
|||||||
fun update(vararg rule: DictRule)
|
fun update(vararg rule: DictRule)
|
||||||
fun delete(rule: DictRule)
|
fun delete(rule: DictRule)
|
||||||
fun edit(rule: DictRule)
|
fun edit(rule: DictRule)
|
||||||
fun toTop(rule: DictRule)
|
|
||||||
fun toBottom(rule: DictRule)
|
|
||||||
fun upOrder()
|
fun upOrder()
|
||||||
fun upCountView()
|
fun upCountView()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,4 +20,14 @@ class DictRuleViewModel(application: Application) : BaseViewModel(application) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun upSortNumber() {
|
||||||
|
execute {
|
||||||
|
val rules = appDb.dictRuleDao.all
|
||||||
|
for ((index, rule) in rules.withIndex()) {
|
||||||
|
rule.sortNumber = index + 1
|
||||||
|
}
|
||||||
|
appDb.dictRuleDao.upsert(*rules.toTypedArray())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -27,6 +27,7 @@ import io.legado.app.ui.book.bookmark.AllBookmarkActivity
|
|||||||
import io.legado.app.ui.book.source.manage.BookSourceActivity
|
import io.legado.app.ui.book.source.manage.BookSourceActivity
|
||||||
import io.legado.app.ui.config.ConfigActivity
|
import io.legado.app.ui.config.ConfigActivity
|
||||||
import io.legado.app.ui.config.ConfigTag
|
import io.legado.app.ui.config.ConfigTag
|
||||||
|
import io.legado.app.ui.dict.rule.DictRuleActivity
|
||||||
import io.legado.app.ui.replace.ReplaceRuleActivity
|
import io.legado.app.ui.replace.ReplaceRuleActivity
|
||||||
import io.legado.app.ui.widget.dialog.TextDialog
|
import io.legado.app.ui.widget.dialog.TextDialog
|
||||||
import io.legado.app.utils.*
|
import io.legado.app.utils.*
|
||||||
@@ -136,6 +137,7 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config) {
|
|||||||
when (preference.key) {
|
when (preference.key) {
|
||||||
"bookSourceManage" -> startActivity<BookSourceActivity>()
|
"bookSourceManage" -> startActivity<BookSourceActivity>()
|
||||||
"replaceManage" -> startActivity<ReplaceRuleActivity>()
|
"replaceManage" -> startActivity<ReplaceRuleActivity>()
|
||||||
|
"dictRuleManage" -> startActivity<DictRuleActivity>()
|
||||||
"bookmark" -> startActivity<AllBookmarkActivity>()
|
"bookmark" -> startActivity<AllBookmarkActivity>()
|
||||||
"setting" -> startActivity<ConfigActivity> {
|
"setting" -> startActivity<ConfigActivity> {
|
||||||
putExtra("configTag", ConfigTag.OTHER_CONFIG)
|
putExtra("configTag", ConfigTag.OTHER_CONFIG)
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<vector android:height="24dp"
|
||||||
|
android:tint="#000000"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:width="24dp"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M14.12,10.47L12,12.59l-2.13,-2.12 -1.41,1.41L10.59,14l-2.12,2.12 1.41,1.41L12,15.41l2.12,2.12 1.41,-1.41L13.41,14l2.12,-2.12zM15.5,4l-1,-1h-5l-1,1H5v2h14V4zM6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM8,9h8v10H8V9z" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
|
<io.legado.app.lib.theme.view.ThemeCheckBox
|
||||||
|
android:id="@+id/cb_name"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
tools:ignore="RtlSymmetry" />
|
||||||
|
|
||||||
|
<io.legado.app.lib.theme.view.ThemeSwitch
|
||||||
|
android:id="@+id/swt_enabled"
|
||||||
|
android:name="@string/enable"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
|
tools:ignore="RtlSymmetry" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_edit"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:contentDescription="@string/edit"
|
||||||
|
android:padding="6dp"
|
||||||
|
android:src="@drawable/ic_edit"
|
||||||
|
android:tint="@color/primaryText" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_delete"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:padding="6dp"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
|
android:src="@drawable/ic_outline_delete"
|
||||||
|
android:tint="@color/primaryText"
|
||||||
|
android:contentDescription="@string/delete"
|
||||||
|
tools:ignore="RtlHardcoded" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?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/menu_create"
|
||||||
|
android:icon="@drawable/ic_add"
|
||||||
|
android:title="@string/create"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_import_local"
|
||||||
|
android:icon="@drawable/ic_import"
|
||||||
|
android:title="@string/import_local"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_import_onLine"
|
||||||
|
android:icon="@drawable/ic_import"
|
||||||
|
android:title="@string/import_on_line"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_import_qr"
|
||||||
|
android:icon="@drawable/ic_import"
|
||||||
|
android:title="@string/import_by_qr_code"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_help"
|
||||||
|
android:icon="@drawable/ic_help"
|
||||||
|
android:title="@string/help"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
|
||||||
|
</menu>
|
||||||
@@ -1073,4 +1073,6 @@
|
|||||||
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
||||||
<string name="source_tab_list">列表</string>
|
<string name="source_tab_list">列表</string>
|
||||||
<string name="dict_rule">字典规则</string>
|
<string name="dict_rule">字典规则</string>
|
||||||
|
<string name="config_dict_rule">配置字典规则</string>
|
||||||
|
<string name="create">新建</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1076,4 +1076,6 @@
|
|||||||
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
||||||
<string name="source_tab_list">列表</string>
|
<string name="source_tab_list">列表</string>
|
||||||
<string name="dict_rule">字典规则</string>
|
<string name="dict_rule">字典规则</string>
|
||||||
|
<string name="config_dict_rule">配置字典规则</string>
|
||||||
|
<string name="create">新建</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1076,4 +1076,6 @@
|
|||||||
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
||||||
<string name="source_tab_list">列表</string>
|
<string name="source_tab_list">列表</string>
|
||||||
<string name="dict_rule">字典规则</string>
|
<string name="dict_rule">字典规则</string>
|
||||||
|
<string name="config_dict_rule">配置字典规则</string>
|
||||||
|
<string name="create">新建</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1073,4 +1073,6 @@
|
|||||||
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
||||||
<string name="source_tab_list">列表</string>
|
<string name="source_tab_list">列表</string>
|
||||||
<string name="dict_rule">字典规则</string>
|
<string name="dict_rule">字典规则</string>
|
||||||
|
<string name="config_dict_rule">配置字典规则</string>
|
||||||
|
<string name="create">新建</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1075,4 +1075,6 @@
|
|||||||
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
||||||
<string name="source_tab_list">列表</string>
|
<string name="source_tab_list">列表</string>
|
||||||
<string name="dict_rule">字典规则</string>
|
<string name="dict_rule">字典规则</string>
|
||||||
|
<string name="config_dict_rule">配置字典规则</string>
|
||||||
|
<string name="create">新建</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1075,4 +1075,6 @@
|
|||||||
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
||||||
<string name="source_tab_list">列表</string>
|
<string name="source_tab_list">列表</string>
|
||||||
<string name="dict_rule">字典规则</string>
|
<string name="dict_rule">字典规则</string>
|
||||||
|
<string name="config_dict_rule">配置字典规则</string>
|
||||||
|
<string name="create">新建</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1076,4 +1076,6 @@
|
|||||||
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
<string name="clear_webview_data_summary">清除内置浏览器所有数据</string>
|
||||||
<string name="source_tab_list">List</string>
|
<string name="source_tab_list">List</string>
|
||||||
<string name="dict_rule">Dict rule</string>
|
<string name="dict_rule">Dict rule</string>
|
||||||
|
<string name="config_dict_rule">Config dict rule</string>
|
||||||
|
<string name="create">新建</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -19,6 +19,13 @@
|
|||||||
android:icon="@drawable/ic_cfg_replace"
|
android:icon="@drawable/ic_cfg_replace"
|
||||||
app:iconSpaceReserved="false" />
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
<io.legado.app.lib.prefs.Preference
|
||||||
|
android:key="dictRuleManage"
|
||||||
|
android:title="@string/dict_rule"
|
||||||
|
android:summary="@string/config_dict_rule"
|
||||||
|
android:icon="@drawable/ic_translate"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<io.legado.app.lib.prefs.NameListPreference
|
<io.legado.app.lib.prefs.NameListPreference
|
||||||
android:defaultValue="0"
|
android:defaultValue="0"
|
||||||
android:entries="@array/theme_mode"
|
android:entries="@array/theme_mode"
|
||||||
|
|||||||
Reference in New Issue
Block a user