增加全局阅读配置界面 #135
This commit is contained in:
@@ -21,6 +21,7 @@ class ConfigActivity : VMBaseActivity<ActivityConfigBinding, ConfigViewModel>()
|
|||||||
ConfigTag.THEME_CONFIG -> replaceFragment<ThemeConfigFragment>(configTag)
|
ConfigTag.THEME_CONFIG -> replaceFragment<ThemeConfigFragment>(configTag)
|
||||||
ConfigTag.BACKUP_CONFIG -> replaceFragment<BackupConfigFragment>(configTag)
|
ConfigTag.BACKUP_CONFIG -> replaceFragment<BackupConfigFragment>(configTag)
|
||||||
ConfigTag.COVER_CONFIG -> replaceFragment<CoverConfigFragment>(configTag)
|
ConfigTag.COVER_CONFIG -> replaceFragment<CoverConfigFragment>(configTag)
|
||||||
|
ConfigTag.READ_CONFIG -> replaceFragment<ReadConfigFragment>(configTag)
|
||||||
else -> finish()
|
else -> finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ object ConfigTag {
|
|||||||
const val THEME_CONFIG = "themeConfig"
|
const val THEME_CONFIG = "themeConfig"
|
||||||
const val BACKUP_CONFIG = "backupConfig"
|
const val BACKUP_CONFIG = "backupConfig"
|
||||||
const val COVER_CONFIG = "coverConfig"
|
const val COVER_CONFIG = "coverConfig"
|
||||||
const val WELCOME_CONFIG = "welcomeConfig"
|
const val READ_CONFIG = "readConfig"
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
package io.legato.kazusa.ui.config
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.SharedPreferences
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewConfiguration
|
||||||
|
import androidx.preference.Preference
|
||||||
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
|
import io.legato.kazusa.R
|
||||||
|
import io.legato.kazusa.constant.EventBus
|
||||||
|
import io.legato.kazusa.constant.PreferKey
|
||||||
|
import io.legato.kazusa.help.config.AppConfig
|
||||||
|
import io.legato.kazusa.help.config.ReadBookConfig
|
||||||
|
import io.legato.kazusa.model.ReadBook
|
||||||
|
import io.legato.kazusa.ui.book.read.ReadBookActivity
|
||||||
|
import io.legato.kazusa.ui.book.read.config.PageKeyDialog
|
||||||
|
import io.legato.kazusa.ui.book.read.page.provider.ChapterProvider
|
||||||
|
import io.legato.kazusa.ui.widget.number.NumberPickerDialog
|
||||||
|
import io.legato.kazusa.utils.canvasrecorder.CanvasRecorderFactory
|
||||||
|
import io.legato.kazusa.utils.getPrefBoolean
|
||||||
|
import io.legato.kazusa.utils.postEvent
|
||||||
|
import io.legato.kazusa.utils.removePref
|
||||||
|
|
||||||
|
class ReadConfigFragment : PreferenceFragmentCompat(),
|
||||||
|
SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
|
|
||||||
|
private val slopSquare by lazy { ViewConfiguration.get(requireContext()).scaledTouchSlop }
|
||||||
|
|
||||||
|
@SuppressLint("RestrictedApi")
|
||||||
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||||
|
addPreferencesFromResource(R.xml.pref_config_read)
|
||||||
|
upPreferenceSummary(PreferKey.menuAlpha, AppConfig.menuAlpha.toString())
|
||||||
|
upPreferenceSummary(PreferKey.pageTouchSlop, slopSquare.toString())
|
||||||
|
if (!CanvasRecorderFactory.isSupport) {
|
||||||
|
removePref(PreferKey.optimizeRender)
|
||||||
|
preferenceScreen.removePreferenceRecursively(PreferKey.optimizeRender)
|
||||||
|
}
|
||||||
|
val pref = findPreference<Preference>("clickRegionalConfig")
|
||||||
|
pref?.isEnabled = false
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
activity?.setTitle(R.string.read)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
preferenceManager
|
||||||
|
.sharedPreferences
|
||||||
|
?.registerOnSharedPreferenceChangeListener(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPause() {
|
||||||
|
preferenceManager
|
||||||
|
.sharedPreferences
|
||||||
|
?.unregisterOnSharedPreferenceChangeListener(this)
|
||||||
|
super.onPause()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onSharedPreferenceChanged(
|
||||||
|
sharedPreferences: SharedPreferences?,
|
||||||
|
key: String?
|
||||||
|
) {
|
||||||
|
when (key) {
|
||||||
|
PreferKey.readBodyToLh -> activity?.recreate()
|
||||||
|
PreferKey.hideStatusBar -> {
|
||||||
|
ReadBookConfig.hideStatusBar = getPrefBoolean(PreferKey.hideStatusBar)
|
||||||
|
postEvent(EventBus.UP_CONFIG, arrayListOf(0, 2))
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.hideNavigationBar -> {
|
||||||
|
ReadBookConfig.hideNavigationBar = getPrefBoolean(PreferKey.hideNavigationBar)
|
||||||
|
postEvent(EventBus.UP_CONFIG, arrayListOf(0, 2))
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.keepLight -> postEvent(key, true)
|
||||||
|
PreferKey.readSliderMode -> postEvent(EventBus.UPDATE_READ_ACTION_BAR, true)
|
||||||
|
PreferKey.textSelectAble -> postEvent(key, getPrefBoolean(key))
|
||||||
|
PreferKey.screenOrientation -> {
|
||||||
|
(activity as? ReadBookActivity)?.setOrientation()
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.textFullJustify,
|
||||||
|
PreferKey.textBottomJustify,
|
||||||
|
PreferKey.useZhLayout -> {
|
||||||
|
postEvent(EventBus.UP_CONFIG, arrayListOf(5))
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.showBrightnessView -> {
|
||||||
|
postEvent(PreferKey.showBrightnessView, "")
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.expandTextMenu -> {
|
||||||
|
(activity as? ReadBookActivity)?.textActionMenu?.upMenu()
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.doublePageHorizontal -> {
|
||||||
|
ChapterProvider.upLayout()
|
||||||
|
ReadBook.loadContent(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.showReadTitleAddition,
|
||||||
|
PreferKey.readBarStyleFollowPage -> {
|
||||||
|
postEvent(EventBus.UPDATE_READ_ACTION_BAR, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.progressBarBehavior -> {
|
||||||
|
postEvent(EventBus.UP_SEEK_BAR, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.noAnimScrollPage -> {
|
||||||
|
ReadBook.callBack?.upPageAnim()
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.optimizeRender -> {
|
||||||
|
ChapterProvider.upStyle()
|
||||||
|
ReadBook.callBack?.upPageAnim(true)
|
||||||
|
ReadBook.loadContent(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.paddingDisplayCutouts -> {
|
||||||
|
postEvent(EventBus.UP_CONFIG, arrayListOf(2))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPreferenceTreeClick(preference: Preference): Boolean {
|
||||||
|
when (preference.key) {
|
||||||
|
"customPageKey" -> PageKeyDialog(requireContext()).show()
|
||||||
|
"clickRegionalConfig" -> {
|
||||||
|
(activity as? ReadBookActivity)?.showClickRegionalConfig()
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.menuAlpha -> {
|
||||||
|
NumberPickerDialog(requireContext())
|
||||||
|
.setTitle(getString(R.string.menu_alpha))
|
||||||
|
.setMaxValue(100)
|
||||||
|
.setMinValue(0)
|
||||||
|
.setValue(AppConfig.menuAlpha)
|
||||||
|
.show {
|
||||||
|
AppConfig.menuAlpha = it
|
||||||
|
upPreferenceSummary(PreferKey.menuAlpha, it.toString())
|
||||||
|
postEvent(EventBus.UPDATE_READ_ACTION_BAR, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferKey.pageTouchSlop -> {
|
||||||
|
NumberPickerDialog(requireContext())
|
||||||
|
.setTitle(getString(R.string.page_touch_slop_dialog_title))
|
||||||
|
.setMaxValue(9999)
|
||||||
|
.setMinValue(0)
|
||||||
|
.setValue(AppConfig.pageTouchSlop)
|
||||||
|
.show {
|
||||||
|
AppConfig.pageTouchSlop = it
|
||||||
|
postEvent(EventBus.UP_CONFIG, arrayListOf(4))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onPreferenceTreeClick(preference)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Suppress("SameParameterValue")
|
||||||
|
private fun upPreferenceSummary(preferenceKey: String, value: String?) {
|
||||||
|
val preference = findPreference<Preference>(preferenceKey) ?: return
|
||||||
|
when (preferenceKey) {
|
||||||
|
PreferKey.menuAlpha -> preference.summary =
|
||||||
|
getString(R.string.menu_alpha_sum, AppConfig.menuAlpha)
|
||||||
|
PreferKey.pageTouchSlop -> preference.summary =
|
||||||
|
getString(R.string.page_touch_slop_summary, value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -152,6 +152,10 @@ class MyFragment() : BaseFragment(R.layout.fragment_my_config), MainFragmentInte
|
|||||||
putExtra("configTag", ConfigTag.THEME_CONFIG)
|
putExtra("configTag", ConfigTag.THEME_CONFIG)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"read_setting" -> startActivity<ConfigActivity> {
|
||||||
|
putExtra("configTag", ConfigTag.READ_CONFIG)
|
||||||
|
}
|
||||||
|
|
||||||
"fileManage" -> startActivity<FileManageActivity>()
|
"fileManage" -> startActivity<FileManageActivity>()
|
||||||
"readRecord" -> startActivity<ReadRecordActivity>()
|
"readRecord" -> startActivity<ReadRecordActivity>()
|
||||||
"about" -> startActivity<AboutActivity>()
|
"about" -> startActivity<AboutActivity>()
|
||||||
|
|||||||
@@ -1309,4 +1309,8 @@
|
|||||||
<string name="text_shadow_y">Y轴距离</string>
|
<string name="text_shadow_y">Y轴距离</string>
|
||||||
<string name="text_shadow_radius">阴影半径</string>
|
<string name="text_shadow_radius">阴影半径</string>
|
||||||
<string name="text_shadow_color">阴影颜色</string>
|
<string name="text_shadow_color">阴影颜色</string>
|
||||||
|
<string name="global_read_setting">全局阅读设置</string>
|
||||||
|
<string name="screen_settings">屏幕显示与亮度</string>
|
||||||
|
<string name="reading_behavior">阅读行为</string>
|
||||||
|
<string name="page_control">翻页控制</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1310,4 +1310,8 @@
|
|||||||
<string name="text_shadow_y">Y轴距离</string>
|
<string name="text_shadow_y">Y轴距离</string>
|
||||||
<string name="text_shadow_radius">阴影半径</string>
|
<string name="text_shadow_radius">阴影半径</string>
|
||||||
<string name="text_shadow_color">阴影颜色</string>
|
<string name="text_shadow_color">阴影颜色</string>
|
||||||
|
<string name="global_read_setting">全局阅读设置</string>
|
||||||
|
<string name="screen_settings">屏幕显示与亮度</string>
|
||||||
|
<string name="reading_behavior">阅读行为</string>
|
||||||
|
<string name="page_control">翻页控制</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -2,225 +2,209 @@
|
|||||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.ThemeModePreference
|
<io.legato.kazusa.lib.prefs.PreferenceCategory
|
||||||
android:defaultValue="0"
|
android:key="screenCategory"
|
||||||
android:entries="@array/theme_mode"
|
android:title="@string/screen_settings"
|
||||||
android:entryValues="@array/theme_mode_v"
|
app:iconSpaceReserved="false">
|
||||||
android:key="themeMode"
|
|
||||||
android:title="@string/theme_mode"
|
|
||||||
android:summary="切换浅色/深色/跟随系统" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||||
android:defaultValue="0"
|
android:defaultValue="0"
|
||||||
android:entries="@array/screen_direction_title"
|
android:entries="@array/screen_direction_title"
|
||||||
android:entryValues="@array/screen_direction_value"
|
android:entryValues="@array/screen_direction_value"
|
||||||
android:key="screenOrientation"
|
android:key="screenOrientation"
|
||||||
android:title="@string/screen_direction"
|
android:title="@string/screen_direction"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||||
android:defaultValue="0"
|
android:defaultValue="0"
|
||||||
android:entries="@array/screen_time_out"
|
android:entries="@array/screen_time_out"
|
||||||
android:entryValues="@array/screen_time_out_value"
|
android:entryValues="@array/screen_time_out_value"
|
||||||
android:key="keep_light"
|
android:key="keep_light"
|
||||||
android:title="@string/keep_light"
|
android:title="@string/keep_light"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="0"
|
android:defaultValue="false"
|
||||||
android:entries="@array/read_slider_mode"
|
android:key="hideStatusBar"
|
||||||
android:entryValues="@array/read_slider_mode_value"
|
android:title="@string/pt_hide_status_bar"
|
||||||
android:key="read_slider_mode"
|
app:isBottomBackground="true" />
|
||||||
android:title="@string/read_slider_mode"
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.Preference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:key="menuAlpha"
|
android:defaultValue="false"
|
||||||
android:summary="@string/menu_alpha_sum"
|
android:key="hideNavigationBar"
|
||||||
android:title="@string/menu_alpha"
|
android:title="@string/pt_hide_navigation_bar"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="hideStatusBar"
|
android:key="paddingDisplayCutouts"
|
||||||
android:title="@string/pt_hide_status_bar"
|
android:title="@string/padding_display_cutouts"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.Preference
|
||||||
android:defaultValue="false"
|
android:key="menuAlpha"
|
||||||
android:key="hideNavigationBar"
|
android:summary="@string/menu_alpha_sum"
|
||||||
android:title="@string/pt_hide_navigation_bar"
|
android:title="@string/menu_alpha"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="readBodyToLh"
|
android:key="readBodyToLh"
|
||||||
android:title="@string/read_body_to_lh"
|
android:title="@string/read_body_to_lh"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="true"
|
||||||
android:key="paddingDisplayCutouts"
|
android:key="textFullJustify"
|
||||||
android:title="@string/padding_display_cutouts"
|
android:title="@string/text_full_justify"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="0"
|
android:defaultValue="true"
|
||||||
android:entries="@array/double_page_title"
|
android:key="textBottomJustify"
|
||||||
android:entryValues="@array/double_page_value"
|
android:title="@string/text_bottom_justify"
|
||||||
android:key="doubleHorizontalPage"
|
app:isBottomBackground="true" />
|
||||||
android:title="@string/double_page_horizontal"
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="page"
|
android:defaultValue="false"
|
||||||
android:entries="@array/progress_bar_behavior_title"
|
android:key="useZhLayout"
|
||||||
android:entryValues="@array/progress_bar_behavior_value"
|
android:title="@string/use_zh_layout"
|
||||||
android:key="progressBarBehavior"
|
app:isBottomBackground="true" />
|
||||||
android:title="@string/progress_bar_behavior"
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="true"
|
||||||
android:key="useZhLayout"
|
android:key="showBrightnessView"
|
||||||
android:title="@string/use_zh_layout"
|
android:title="@string/show_brightness_view"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
</io.legato.kazusa.lib.prefs.PreferenceCategory>
|
||||||
android:defaultValue="true"
|
|
||||||
android:key="textFullJustify"
|
|
||||||
android:title="@string/text_full_justify"
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.PreferenceCategory
|
||||||
android:defaultValue="true"
|
android:key="pageControlCategory"
|
||||||
android:key="textBottomJustify"
|
android:title="@string/page_control"
|
||||||
android:title="@string/text_bottom_justify"
|
app:iconSpaceReserved="false">
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="0"
|
||||||
android:key="mouseWheelPage"
|
android:entries="@array/read_slider_mode"
|
||||||
android:title="@string/mouse_wheel_page"
|
android:entryValues="@array/read_slider_mode_value"
|
||||||
app:iconSpaceReserved="false"
|
android:key="read_slider_mode"
|
||||||
app:isBottomBackground="true" />
|
android:title="@string/read_slider_mode"
|
||||||
|
app:isBottomBackground="true" />
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="0"
|
||||||
android:key="volumeKeyPage"
|
android:entries="@array/double_page_title"
|
||||||
android:title="@string/volume_key_page"
|
android:entryValues="@array/double_page_value"
|
||||||
app:iconSpaceReserved="false"
|
android:key="doubleHorizontalPage"
|
||||||
app:isBottomBackground="true" />
|
android:title="@string/double_page_horizontal"
|
||||||
|
app:isBottomBackground="true" />
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="page"
|
||||||
android:key="volumeKeyPageOnPlay"
|
android:entries="@array/progress_bar_behavior_title"
|
||||||
android:title="@string/volume_key_page_on_play"
|
android:entryValues="@array/progress_bar_behavior_value"
|
||||||
app:iconSpaceReserved="false"
|
android:key="progressBarBehavior"
|
||||||
app:isBottomBackground="true" />
|
android:title="@string/progress_bar_behavior"
|
||||||
|
app:isBottomBackground="true" />
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="true"
|
||||||
android:key="keyPageOnLongPress"
|
android:key="mouseWheelPage"
|
||||||
android:title="@string/key_page_on_long_press"
|
android:title="@string/mouse_wheel_page"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.Preference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:key="pageTouchSlop"
|
android:defaultValue="true"
|
||||||
android:summary="@string/page_touch_slop_summary"
|
android:key="volumeKeyPage"
|
||||||
android:title="@string/page_touch_slop_title"
|
android:title="@string/volume_key_page"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="false"
|
||||||
android:key="autoChangeSource"
|
android:key="volumeKeyPageOnPlay"
|
||||||
android:title="@string/auto_change_source"
|
android:title="@string/volume_key_page_on_play"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="false"
|
||||||
android:key="selectText"
|
android:key="keyPageOnLongPress"
|
||||||
android:title="@string/selectText"
|
android:title="@string/key_page_on_long_press"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.Preference
|
||||||
android:defaultValue="true"
|
android:key="pageTouchSlop"
|
||||||
android:key="showBrightnessView"
|
android:summary="@string/page_touch_slop_summary"
|
||||||
android:title="@string/show_brightness_view"
|
android:title="@string/page_touch_slop_title"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
</io.legato.kazusa.lib.prefs.PreferenceCategory>
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.PreferenceCategory
|
||||||
android:defaultValue="false"
|
android:key="otherCategory"
|
||||||
android:key="noAnimScrollPage"
|
android:title="@string/other"
|
||||||
android:title="@string/no_anim_scroll_page"
|
app:iconSpaceReserved="false">
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="true"
|
||||||
android:key="previewImageByClick"
|
android:key="autoChangeSource"
|
||||||
android:title="@string/preview_image_by_click"
|
android:title="@string/auto_change_source"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="true"
|
||||||
android:key="optimizeRender"
|
android:key="selectText"
|
||||||
android:title="@string/enable_optimize_render"
|
android:title="@string/selectText"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.Preference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:key="clickRegionalConfig"
|
android:defaultValue="false"
|
||||||
android:title="@string/click_regional_config"
|
android:key="noAnimScrollPage"
|
||||||
app:iconSpaceReserved="false"
|
android:title="@string/no_anim_scroll_page"
|
||||||
app:isBottomBackground="true" />
|
app:isBottomBackground="true" />
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="disableReturnKey"
|
android:key="previewImageByClick"
|
||||||
android:title="@string/disable_return_key"
|
android:title="@string/preview_image_by_click"
|
||||||
app:iconSpaceReserved="false"
|
app:isBottomBackground="true" />
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.Preference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:key="customPageKey"
|
android:defaultValue="false"
|
||||||
android:title="@string/custom_page_key"
|
android:key="optimizeRender"
|
||||||
app:iconSpaceReserved="false"
|
android:title="@string/enable_optimize_render"
|
||||||
app:isBottomBackground="true" />
|
app:isBottomBackground="true" />
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.Preference
|
||||||
android:defaultValue="false"
|
android:key="clickRegionalConfig"
|
||||||
android:key="expandTextMenu"
|
android:title="@string/click_regional_config"
|
||||||
android:title="@string/expand_text_menu"
|
app:isBottomBackground="true" />
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:isBottomBackground="true" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="false"
|
||||||
android:key="showReadTitleAddition"
|
android:key="disableReturnKey"
|
||||||
android:title="@string/show_read_title_addition" />
|
android:title="@string/disable_return_key"
|
||||||
|
app:isBottomBackground="true" />
|
||||||
|
|
||||||
|
<io.legato.kazusa.lib.prefs.Preference
|
||||||
|
android:key="customPageKey"
|
||||||
|
android:title="@string/custom_page_key"
|
||||||
|
app:isBottomBackground="true" />
|
||||||
|
|
||||||
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="expandTextMenu"
|
||||||
|
android:title="@string/expand_text_menu"
|
||||||
|
app:isBottomBackground="true" />
|
||||||
|
|
||||||
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
|
android:defaultValue="true"
|
||||||
|
android:key="showReadTitleAddition"
|
||||||
|
android:title="@string/show_read_title_addition" />
|
||||||
|
|
||||||
|
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="readBarStyleFollowPage"
|
||||||
|
android:title="@string/read_bar_style_follow_page" />
|
||||||
|
</io.legato.kazusa.lib.prefs.PreferenceCategory>
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
|
||||||
android:defaultValue="false"
|
|
||||||
android:key="readBarStyleFollowPage"
|
|
||||||
android:title="@string/read_bar_style_follow_page" />
|
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
||||||
@@ -41,6 +41,13 @@
|
|||||||
android:title="@string/theme_setting"
|
android:title="@string/theme_setting"
|
||||||
app:iconSpaceReserved="false" />
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
<io.legato.kazusa.lib.prefs.Preference
|
||||||
|
android:icon="@drawable/ic_book_has"
|
||||||
|
android:key="read_setting"
|
||||||
|
android:summary="@string/global_read_setting"
|
||||||
|
android:title="@string/read"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<io.legato.kazusa.lib.prefs.Preference
|
<io.legato.kazusa.lib.prefs.Preference
|
||||||
android:icon="@drawable/ic_cfg_other"
|
android:icon="@drawable/ic_cfg_other"
|
||||||
android:key="setting"
|
android:key="setting"
|
||||||
|
|||||||
Reference in New Issue
Block a user