增加全局阅读配置界面 #135
This commit is contained in:
@@ -21,6 +21,7 @@ class ConfigActivity : VMBaseActivity<ActivityConfigBinding, ConfigViewModel>()
|
||||
ConfigTag.THEME_CONFIG -> replaceFragment<ThemeConfigFragment>(configTag)
|
||||
ConfigTag.BACKUP_CONFIG -> replaceFragment<BackupConfigFragment>(configTag)
|
||||
ConfigTag.COVER_CONFIG -> replaceFragment<CoverConfigFragment>(configTag)
|
||||
ConfigTag.READ_CONFIG -> replaceFragment<ReadConfigFragment>(configTag)
|
||||
else -> finish()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ object ConfigTag {
|
||||
const val THEME_CONFIG = "themeConfig"
|
||||
const val BACKUP_CONFIG = "backupConfig"
|
||||
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)
|
||||
}
|
||||
|
||||
"read_setting" -> startActivity<ConfigActivity> {
|
||||
putExtra("configTag", ConfigTag.READ_CONFIG)
|
||||
}
|
||||
|
||||
"fileManage" -> startActivity<FileManageActivity>()
|
||||
"readRecord" -> startActivity<ReadRecordActivity>()
|
||||
"about" -> startActivity<AboutActivity>()
|
||||
|
||||
@@ -1309,4 +1309,8 @@
|
||||
<string name="text_shadow_y">Y轴距离</string>
|
||||
<string name="text_shadow_radius">阴影半径</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>
|
||||
|
||||
@@ -1310,4 +1310,8 @@
|
||||
<string name="text_shadow_y">Y轴距离</string>
|
||||
<string name="text_shadow_radius">阴影半径</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>
|
||||
|
||||
@@ -2,225 +2,209 @@
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<io.legato.kazusa.lib.prefs.ThemeModePreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/theme_mode"
|
||||
android:entryValues="@array/theme_mode_v"
|
||||
android:key="themeMode"
|
||||
android:title="@string/theme_mode"
|
||||
android:summary="切换浅色/深色/跟随系统" />
|
||||
<io.legato.kazusa.lib.prefs.PreferenceCategory
|
||||
android:key="screenCategory"
|
||||
android:title="@string/screen_settings"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/screen_direction_title"
|
||||
android:entryValues="@array/screen_direction_value"
|
||||
android:key="screenOrientation"
|
||||
android:title="@string/screen_direction"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/screen_direction_title"
|
||||
android:entryValues="@array/screen_direction_value"
|
||||
android:key="screenOrientation"
|
||||
android:title="@string/screen_direction"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/screen_time_out"
|
||||
android:entryValues="@array/screen_time_out_value"
|
||||
android:key="keep_light"
|
||||
android:title="@string/keep_light"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/screen_time_out"
|
||||
android:entryValues="@array/screen_time_out_value"
|
||||
android:key="keep_light"
|
||||
android:title="@string/keep_light"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/read_slider_mode"
|
||||
android:entryValues="@array/read_slider_mode_value"
|
||||
android:key="read_slider_mode"
|
||||
android:title="@string/read_slider_mode"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="hideStatusBar"
|
||||
android:title="@string/pt_hide_status_bar"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.Preference
|
||||
android:key="menuAlpha"
|
||||
android:summary="@string/menu_alpha_sum"
|
||||
android:title="@string/menu_alpha"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="hideNavigationBar"
|
||||
android:title="@string/pt_hide_navigation_bar"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="hideStatusBar"
|
||||
android:title="@string/pt_hide_status_bar"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="paddingDisplayCutouts"
|
||||
android:title="@string/padding_display_cutouts"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="hideNavigationBar"
|
||||
android:title="@string/pt_hide_navigation_bar"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.Preference
|
||||
android:key="menuAlpha"
|
||||
android:summary="@string/menu_alpha_sum"
|
||||
android:title="@string/menu_alpha"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="readBodyToLh"
|
||||
android:title="@string/read_body_to_lh"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="readBodyToLh"
|
||||
android:title="@string/read_body_to_lh"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="paddingDisplayCutouts"
|
||||
android:title="@string/padding_display_cutouts"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="textFullJustify"
|
||||
android:title="@string/text_full_justify"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/double_page_title"
|
||||
android:entryValues="@array/double_page_value"
|
||||
android:key="doubleHorizontalPage"
|
||||
android:title="@string/double_page_horizontal"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="textBottomJustify"
|
||||
android:title="@string/text_bottom_justify"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||
android:defaultValue="page"
|
||||
android:entries="@array/progress_bar_behavior_title"
|
||||
android:entryValues="@array/progress_bar_behavior_value"
|
||||
android:key="progressBarBehavior"
|
||||
android:title="@string/progress_bar_behavior"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="useZhLayout"
|
||||
android:title="@string/use_zh_layout"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="useZhLayout"
|
||||
android:title="@string/use_zh_layout"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="showBrightnessView"
|
||||
android:title="@string/show_brightness_view"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="textFullJustify"
|
||||
android:title="@string/text_full_justify"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
</io.legato.kazusa.lib.prefs.PreferenceCategory>
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="textBottomJustify"
|
||||
android:title="@string/text_bottom_justify"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.PreferenceCategory
|
||||
android:key="pageControlCategory"
|
||||
android:title="@string/page_control"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="mouseWheelPage"
|
||||
android:title="@string/mouse_wheel_page"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/read_slider_mode"
|
||||
android:entryValues="@array/read_slider_mode_value"
|
||||
android:key="read_slider_mode"
|
||||
android:title="@string/read_slider_mode"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="volumeKeyPage"
|
||||
android:title="@string/volume_key_page"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/double_page_title"
|
||||
android:entryValues="@array/double_page_value"
|
||||
android:key="doubleHorizontalPage"
|
||||
android:title="@string/double_page_horizontal"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="volumeKeyPageOnPlay"
|
||||
android:title="@string/volume_key_page_on_play"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||
android:defaultValue="page"
|
||||
android:entries="@array/progress_bar_behavior_title"
|
||||
android:entryValues="@array/progress_bar_behavior_value"
|
||||
android:key="progressBarBehavior"
|
||||
android:title="@string/progress_bar_behavior"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="keyPageOnLongPress"
|
||||
android:title="@string/key_page_on_long_press"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="mouseWheelPage"
|
||||
android:title="@string/mouse_wheel_page"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.Preference
|
||||
android:key="pageTouchSlop"
|
||||
android:summary="@string/page_touch_slop_summary"
|
||||
android:title="@string/page_touch_slop_title"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="volumeKeyPage"
|
||||
android:title="@string/volume_key_page"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="autoChangeSource"
|
||||
android:title="@string/auto_change_source"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="volumeKeyPageOnPlay"
|
||||
android:title="@string/volume_key_page_on_play"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="selectText"
|
||||
android:title="@string/selectText"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="keyPageOnLongPress"
|
||||
android:title="@string/key_page_on_long_press"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="showBrightnessView"
|
||||
android:title="@string/show_brightness_view"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.Preference
|
||||
android:key="pageTouchSlop"
|
||||
android:summary="@string/page_touch_slop_summary"
|
||||
android:title="@string/page_touch_slop_title"
|
||||
app:isBottomBackground="true" />
|
||||
</io.legato.kazusa.lib.prefs.PreferenceCategory>
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="noAnimScrollPage"
|
||||
android:title="@string/no_anim_scroll_page"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.PreferenceCategory
|
||||
android:key="otherCategory"
|
||||
android:title="@string/other"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="previewImageByClick"
|
||||
android:title="@string/preview_image_by_click"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="autoChangeSource"
|
||||
android:title="@string/auto_change_source"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="optimizeRender"
|
||||
android:title="@string/enable_optimize_render"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="selectText"
|
||||
android:title="@string/selectText"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.Preference
|
||||
android:key="clickRegionalConfig"
|
||||
android:title="@string/click_regional_config"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="noAnimScrollPage"
|
||||
android:title="@string/no_anim_scroll_page"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="disableReturnKey"
|
||||
android:title="@string/disable_return_key"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="previewImageByClick"
|
||||
android:title="@string/preview_image_by_click"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.Preference
|
||||
android:key="customPageKey"
|
||||
android:title="@string/custom_page_key"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="optimizeRender"
|
||||
android:title="@string/enable_optimize_render"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="expandTextMenu"
|
||||
android:title="@string/expand_text_menu"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
<io.legato.kazusa.lib.prefs.Preference
|
||||
android:key="clickRegionalConfig"
|
||||
android:title="@string/click_regional_config"
|
||||
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="disableReturnKey"
|
||||
android:title="@string/disable_return_key"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="readBarStyleFollowPage"
|
||||
android:title="@string/read_bar_style_follow_page" />
|
||||
</androidx.preference.PreferenceScreen>
|
||||
<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>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
||||
@@ -41,6 +41,13 @@
|
||||
android:title="@string/theme_setting"
|
||||
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
|
||||
android:icon="@drawable/ic_cfg_other"
|
||||
android:key="setting"
|
||||
|
||||
Reference in New Issue
Block a user