diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/ColorPreference.kt b/app/src/main/java/io/legado/app/lib/prefs/ColorPreference.kt similarity index 99% rename from app/src/main/java/io/legado/app/ui/widget/prefs/ColorPreference.kt rename to app/src/main/java/io/legado/app/lib/prefs/ColorPreference.kt index 806cb9ac9..3ea1181a1 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/ColorPreference.kt +++ b/app/src/main/java/io/legado/app/lib/prefs/ColorPreference.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget.prefs +package io.legado.app.lib.prefs import android.content.Context import android.content.ContextWrapper @@ -118,7 +118,7 @@ class ColorPreference(context: Context, attrs: AttributeSet) : Preference(contex } override fun onBindViewHolder(holder: PreferenceViewHolder) { - val v = io.legado.app.ui.widget.prefs.Preference.bindView( + val v = io.legado.app.lib.prefs.Preference.bindView( context, holder, icon, title, summary, widgetLayoutResource, io.legado.app.R.id.cpv_preference_preview_color_panel, 30, 30 ) diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/EditTextPreference.kt b/app/src/main/java/io/legado/app/lib/prefs/EditTextPreference.kt similarity index 94% rename from app/src/main/java/io/legado/app/ui/widget/prefs/EditTextPreference.kt rename to app/src/main/java/io/legado/app/lib/prefs/EditTextPreference.kt index 97ffa92b8..f32966841 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/EditTextPreference.kt +++ b/app/src/main/java/io/legado/app/lib/prefs/EditTextPreference.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget.prefs +package io.legado.app.lib.prefs import android.content.Context import android.util.AttributeSet diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/EditTextPreferenceDialog.kt b/app/src/main/java/io/legado/app/lib/prefs/EditTextPreferenceDialog.kt similarity index 95% rename from app/src/main/java/io/legado/app/ui/widget/prefs/EditTextPreferenceDialog.kt rename to app/src/main/java/io/legado/app/lib/prefs/EditTextPreferenceDialog.kt index 06a6bb960..f3bd5137f 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/EditTextPreferenceDialog.kt +++ b/app/src/main/java/io/legado/app/lib/prefs/EditTextPreferenceDialog.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget.prefs +package io.legado.app.lib.prefs import android.app.Dialog import android.os.Bundle diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/IconListPreference.kt b/app/src/main/java/io/legado/app/lib/prefs/IconListPreference.kt similarity index 99% rename from app/src/main/java/io/legado/app/ui/widget/prefs/IconListPreference.kt rename to app/src/main/java/io/legado/app/lib/prefs/IconListPreference.kt index de1718472..046d6d7d6 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/IconListPreference.kt +++ b/app/src/main/java/io/legado/app/lib/prefs/IconListPreference.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget.prefs +package io.legado.app.lib.prefs import android.content.Context import android.content.ContextWrapper diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/ListPreferenceDialog.kt b/app/src/main/java/io/legado/app/lib/prefs/ListPreferenceDialog.kt similarity index 95% rename from app/src/main/java/io/legado/app/ui/widget/prefs/ListPreferenceDialog.kt rename to app/src/main/java/io/legado/app/lib/prefs/ListPreferenceDialog.kt index 3c324601e..d4e626299 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/ListPreferenceDialog.kt +++ b/app/src/main/java/io/legado/app/lib/prefs/ListPreferenceDialog.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget.prefs +package io.legado.app.lib.prefs import android.app.Dialog import android.os.Bundle diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/MultiSelectListPreferenceDialog.kt b/app/src/main/java/io/legado/app/lib/prefs/MultiSelectListPreferenceDialog.kt similarity index 95% rename from app/src/main/java/io/legado/app/ui/widget/prefs/MultiSelectListPreferenceDialog.kt rename to app/src/main/java/io/legado/app/lib/prefs/MultiSelectListPreferenceDialog.kt index 62c057f74..6bc6051b1 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/MultiSelectListPreferenceDialog.kt +++ b/app/src/main/java/io/legado/app/lib/prefs/MultiSelectListPreferenceDialog.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget.prefs +package io.legado.app.lib.prefs import android.app.Dialog import android.os.Bundle diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt b/app/src/main/java/io/legado/app/lib/prefs/NameListPreference.kt similarity index 97% rename from app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt rename to app/src/main/java/io/legado/app/lib/prefs/NameListPreference.kt index cf06ec6f8..8658c2ccc 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt +++ b/app/src/main/java/io/legado/app/lib/prefs/NameListPreference.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget.prefs +package io.legado.app.lib.prefs import android.content.Context import android.util.AttributeSet diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt b/app/src/main/java/io/legado/app/lib/prefs/Preference.kt similarity index 99% rename from app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt rename to app/src/main/java/io/legado/app/lib/prefs/Preference.kt index 6cd98ce18..6ed4c9cfc 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt +++ b/app/src/main/java/io/legado/app/lib/prefs/Preference.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget.prefs +package io.legado.app.lib.prefs import android.content.Context import android.graphics.drawable.Drawable diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/PreferenceCategory.kt b/app/src/main/java/io/legado/app/lib/prefs/PreferenceCategory.kt similarity index 98% rename from app/src/main/java/io/legado/app/ui/widget/prefs/PreferenceCategory.kt rename to app/src/main/java/io/legado/app/lib/prefs/PreferenceCategory.kt index 74ff487df..725fab609 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/PreferenceCategory.kt +++ b/app/src/main/java/io/legado/app/lib/prefs/PreferenceCategory.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget.prefs +package io.legado.app.lib.prefs import android.content.Context import android.util.AttributeSet diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/SwitchPreference.kt b/app/src/main/java/io/legado/app/lib/prefs/SwitchPreference.kt similarity index 97% rename from app/src/main/java/io/legado/app/ui/widget/prefs/SwitchPreference.kt rename to app/src/main/java/io/legado/app/lib/prefs/SwitchPreference.kt index 3c4e29aa9..d71e914b7 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/SwitchPreference.kt +++ b/app/src/main/java/io/legado/app/lib/prefs/SwitchPreference.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget.prefs +package io.legado.app.lib.prefs import android.content.Context import android.util.AttributeSet diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/fragment/PreferenceFragment.kt b/app/src/main/java/io/legado/app/lib/prefs/fragment/PreferenceFragment.kt similarity index 89% rename from app/src/main/java/io/legado/app/ui/widget/prefs/fragment/PreferenceFragment.kt rename to app/src/main/java/io/legado/app/lib/prefs/fragment/PreferenceFragment.kt index 012b7883f..b18dbdece 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/fragment/PreferenceFragment.kt +++ b/app/src/main/java/io/legado/app/lib/prefs/fragment/PreferenceFragment.kt @@ -1,11 +1,11 @@ -package io.legado.app.ui.widget.prefs.fragment +package io.legado.app.lib.prefs.fragment import android.annotation.SuppressLint import androidx.fragment.app.DialogFragment import androidx.preference.* -import io.legado.app.ui.widget.prefs.EditTextPreferenceDialog -import io.legado.app.ui.widget.prefs.ListPreferenceDialog -import io.legado.app.ui.widget.prefs.MultiSelectListPreferenceDialog +import io.legado.app.lib.prefs.EditTextPreferenceDialog +import io.legado.app.lib.prefs.ListPreferenceDialog +import io.legado.app.lib.prefs.MultiSelectListPreferenceDialog abstract class PreferenceFragment : PreferenceFragmentCompat() { diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt index f4b56f7d4..76462ca18 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt @@ -12,12 +12,12 @@ import io.legado.app.R import io.legado.app.constant.EventBus import io.legado.app.constant.PreferKey import io.legado.app.help.config.ReadBookConfig +import io.legado.app.lib.prefs.fragment.PreferenceFragment import io.legado.app.lib.theme.bottomBackground import io.legado.app.lib.theme.primaryColor import io.legado.app.model.ReadBook import io.legado.app.ui.book.read.ReadBookActivity import io.legado.app.ui.book.read.page.provider.ChapterProvider -import io.legado.app.ui.widget.prefs.fragment.PreferenceFragment import io.legado.app.utils.dpToPx import io.legado.app.utils.getPrefBoolean import io.legado.app.utils.postEvent diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudConfigDialog.kt index 344bf4487..e303a6d7e 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudConfigDialog.kt @@ -15,11 +15,11 @@ import io.legado.app.constant.PreferKey import io.legado.app.data.appDb import io.legado.app.help.IntentHelp import io.legado.app.lib.dialogs.SelectItem +import io.legado.app.lib.prefs.fragment.PreferenceFragment import io.legado.app.lib.theme.backgroundColor import io.legado.app.lib.theme.primaryColor import io.legado.app.model.ReadAloud import io.legado.app.service.BaseReadAloudService -import io.legado.app.ui.widget.prefs.fragment.PreferenceFragment import io.legado.app.utils.* class ReadAloudConfigDialog : DialogFragment() { diff --git a/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt index 7bcc14606..bf3fa55ca 100644 --- a/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt @@ -24,11 +24,11 @@ import io.legado.app.help.storage.* import io.legado.app.lib.dialogs.alert import io.legado.app.lib.permission.Permissions import io.legado.app.lib.permission.PermissionsCompat +import io.legado.app.lib.prefs.fragment.PreferenceFragment import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.primaryColor import io.legado.app.ui.document.HandleFileContract import io.legado.app.ui.widget.dialog.TextDialog -import io.legado.app.ui.widget.prefs.fragment.PreferenceFragment import io.legado.app.utils.* import kotlinx.coroutines.Dispatchers.Main import kotlinx.coroutines.launch @@ -127,7 +127,7 @@ class BackupConfigFragment : PreferenceFragment(), upPreferenceSummary(PreferKey.webDavPassword, getPrefString(PreferKey.webDavPassword)) upPreferenceSummary(PreferKey.webDavDir, AppConfig.webDavDir) upPreferenceSummary(PreferKey.backupPath, getPrefString(PreferKey.backupPath)) - findPreference("web_dav_restore") + findPreference("web_dav_restore") ?.onLongClick { restoreDir.launch(); true } } diff --git a/app/src/main/java/io/legado/app/ui/config/CoverConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/CoverConfigFragment.kt index b064c9390..45496d0c9 100644 --- a/app/src/main/java/io/legado/app/ui/config/CoverConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/CoverConfigFragment.kt @@ -9,10 +9,10 @@ import androidx.preference.Preference import io.legado.app.R import io.legado.app.constant.PreferKey import io.legado.app.lib.dialogs.selector +import io.legado.app.lib.prefs.SwitchPreference +import io.legado.app.lib.prefs.fragment.PreferenceFragment import io.legado.app.lib.theme.primaryColor import io.legado.app.model.BookCover -import io.legado.app.ui.widget.prefs.SwitchPreference -import io.legado.app.ui.widget.prefs.fragment.PreferenceFragment import io.legado.app.utils.* import java.io.FileOutputStream diff --git a/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt index 27f5983ab..f1ec03bce 100644 --- a/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt @@ -15,13 +15,13 @@ import io.legado.app.constant.PreferKey import io.legado.app.databinding.DialogEditTextBinding import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.alert +import io.legado.app.lib.prefs.fragment.PreferenceFragment import io.legado.app.lib.theme.primaryColor import io.legado.app.model.CheckSource import io.legado.app.receiver.SharedReceiverActivity import io.legado.app.service.WebService import io.legado.app.ui.document.HandleFileContract import io.legado.app.ui.widget.number.NumberPickerDialog -import io.legado.app.ui.widget.prefs.fragment.PreferenceFragment import io.legado.app.utils.* import splitties.init.appCtx diff --git a/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt index ebdadfb2b..567217e07 100644 --- a/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt @@ -23,10 +23,10 @@ import io.legado.app.help.config.AppConfig import io.legado.app.help.config.ThemeConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.selector +import io.legado.app.lib.prefs.ColorPreference +import io.legado.app.lib.prefs.fragment.PreferenceFragment import io.legado.app.lib.theme.primaryColor import io.legado.app.ui.widget.number.NumberPickerDialog -import io.legado.app.ui.widget.prefs.ColorPreference -import io.legado.app.ui.widget.prefs.fragment.PreferenceFragment import io.legado.app.ui.widget.seekbar.SeekBarChangeListener import io.legado.app.utils.* import java.io.FileOutputStream diff --git a/app/src/main/java/io/legado/app/ui/config/WelcomeConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/WelcomeConfigFragment.kt index 0905fe62f..2e9ea30c5 100644 --- a/app/src/main/java/io/legado/app/ui/config/WelcomeConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/WelcomeConfigFragment.kt @@ -9,9 +9,9 @@ import androidx.preference.Preference import io.legado.app.R import io.legado.app.constant.PreferKey import io.legado.app.lib.dialogs.selector +import io.legado.app.lib.prefs.fragment.PreferenceFragment import io.legado.app.lib.theme.primaryColor import io.legado.app.model.BookCover -import io.legado.app.ui.widget.prefs.fragment.PreferenceFragment import io.legado.app.utils.* import java.io.FileOutputStream diff --git a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt index f4b3c6d53..df40f6cad 100644 --- a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt @@ -14,6 +14,10 @@ import io.legado.app.databinding.FragmentMyConfigBinding import io.legado.app.help.config.AppConfig import io.legado.app.help.config.ThemeConfig import io.legado.app.lib.dialogs.selector +import io.legado.app.lib.prefs.NameListPreference +import io.legado.app.lib.prefs.PreferenceCategory +import io.legado.app.lib.prefs.SwitchPreference +import io.legado.app.lib.prefs.fragment.PreferenceFragment import io.legado.app.lib.theme.primaryColor import io.legado.app.service.WebService import io.legado.app.ui.about.AboutActivity @@ -25,10 +29,6 @@ import io.legado.app.ui.config.ConfigActivity import io.legado.app.ui.config.ConfigTag import io.legado.app.ui.replace.ReplaceRuleActivity import io.legado.app.ui.widget.dialog.TextDialog -import io.legado.app.ui.widget.prefs.NameListPreference -import io.legado.app.ui.widget.prefs.PreferenceCategory -import io.legado.app.ui.widget.prefs.SwitchPreference -import io.legado.app.ui.widget.prefs.fragment.PreferenceFragment import io.legado.app.utils.* import io.legado.app.utils.viewbindingdelegate.viewBinding diff --git a/app/src/main/res/xml/about.xml b/app/src/main/res/xml/about.xml index d0a498c0d..b62f4a2f4 100644 --- a/app/src/main/res/xml/about.xml +++ b/app/src/main/res/xml/about.xml @@ -2,82 +2,82 @@ - - - - - - - - - - - - - - + - - - - - + \ No newline at end of file diff --git a/app/src/main/res/xml/donate.xml b/app/src/main/res/xml/donate.xml index 1b4d7af60..9b43609cb 100644 --- a/app/src/main/res/xml/donate.xml +++ b/app/src/main/res/xml/donate.xml @@ -2,20 +2,20 @@ - - - - + - - - - - + - - - + \ No newline at end of file diff --git a/app/src/main/res/xml/pref_config_aloud.xml b/app/src/main/res/xml/pref_config_aloud.xml index edb0e7ca7..333e0aa40 100644 --- a/app/src/main/res/xml/pref_config_aloud.xml +++ b/app/src/main/res/xml/pref_config_aloud.xml @@ -2,38 +2,38 @@ - - - - - - + \ No newline at end of file diff --git a/app/src/main/res/xml/pref_config_backup.xml b/app/src/main/res/xml/pref_config_backup.xml index 06085208d..faf7e214b 100644 --- a/app/src/main/res/xml/pref_config_backup.xml +++ b/app/src/main/res/xml/pref_config_backup.xml @@ -2,39 +2,39 @@ - - - - - - - + - - - - - - - + diff --git a/app/src/main/res/xml/pref_config_cover.xml b/app/src/main/res/xml/pref_config_cover.xml index ca692fb57..1d8db29ed 100644 --- a/app/src/main/res/xml/pref_config_cover.xml +++ b/app/src/main/res/xml/pref_config_cover.xml @@ -2,13 +2,13 @@ - - - - - - - - + - - - - - + \ No newline at end of file diff --git a/app/src/main/res/xml/pref_config_other.xml b/app/src/main/res/xml/pref_config_other.xml index 0b0d6ffa8..931deb5f9 100644 --- a/app/src/main/res/xml/pref_config_other.xml +++ b/app/src/main/res/xml/pref_config_other.xml @@ -2,41 +2,41 @@ - - - - - - - + - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/app/src/main/res/xml/pref_config_read.xml b/app/src/main/res/xml/pref_config_read.xml index 4b26da4b7..1c8a29afb 100644 --- a/app/src/main/res/xml/pref_config_read.xml +++ b/app/src/main/res/xml/pref_config_read.xml @@ -2,7 +2,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + \ No newline at end of file diff --git a/app/src/main/res/xml/pref_config_welcome.xml b/app/src/main/res/xml/pref_config_welcome.xml index 66f780983..bdd19fe68 100644 --- a/app/src/main/res/xml/pref_config_welcome.xml +++ b/app/src/main/res/xml/pref_config_welcome.xml @@ -2,7 +2,7 @@ - - - - - - + - - - - - + \ No newline at end of file diff --git a/app/src/main/res/xml/pref_main.xml b/app/src/main/res/xml/pref_main.xml index 45cba0157..70d80013d 100644 --- a/app/src/main/res/xml/pref_main.xml +++ b/app/src/main/res/xml/pref_main.xml @@ -5,21 +5,21 @@ app:allowDividerAbove="false" app:allowDividerBelow="false"> - - - - - - - - - + - - - - - - + \ No newline at end of file