设置页面改为Md3风格,动态颜色的变更会立即生效了。
This commit is contained in:
parent
01715baa99
commit
542c5fa091
|
@ -24,12 +24,12 @@ android {
|
||||||
keyAlias 'coldmint'
|
keyAlias 'coldmint'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
buildToolsVersion "30.0.3"
|
buildToolsVersion "30.0.3"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.coldmint.rust.pro"
|
applicationId "com.coldmint.rust.pro"
|
||||||
minSdkVersion 21
|
minSdkVersion 23
|
||||||
targetSdkVersion 33
|
targetSdkVersion 33
|
||||||
versionCode 27
|
versionCode 27
|
||||||
versionName "2.1 Bata5(2023-4-21)"
|
versionName "2.1 Bata5(2023-4-21)"
|
||||||
|
@ -72,6 +72,13 @@ android {
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
configurations.all {
|
||||||
|
exclude group: 'androidx.appcompat', module: 'appcompat'
|
||||||
|
}
|
||||||
|
implementation('org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0') {
|
||||||
|
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
|
||||||
|
}
|
||||||
|
|
||||||
implementation platform('com.google.firebase:firebase-bom:31.1.1')
|
implementation platform('com.google.firebase:firebase-bom:31.1.1')
|
||||||
implementation 'com.google.firebase:firebase-analytics-ktx'
|
implementation 'com.google.firebase:firebase-analytics-ktx'
|
||||||
implementation 'com.google.firebase:firebase-crashlytics-ktx'
|
implementation 'com.google.firebase:firebase-crashlytics-ktx'
|
||||||
|
@ -92,6 +99,7 @@ dependencies {
|
||||||
kapt "androidx.room:room-compiler:2.4.0"
|
kapt "androidx.room:room-compiler:2.4.0"
|
||||||
|
|
||||||
implementation "dev.rikka.rikkax.preference:simplemenu-preference:1.0.3"
|
implementation "dev.rikka.rikkax.preference:simplemenu-preference:1.0.3"
|
||||||
|
implementation "dev.rikka.rikkax.material:material-preference:2.0.0"
|
||||||
|
|
||||||
//沉浸式状态栏
|
//沉浸式状态栏
|
||||||
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
|
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
|
||||||
|
@ -113,8 +121,9 @@ dependencies {
|
||||||
implementation 'com.github.florent37:glidepalette:2.1.2'
|
implementation 'com.github.florent37:glidepalette:2.1.2'
|
||||||
implementation 'cat.ereza:customactivityoncrash:2.3.0'
|
implementation 'cat.ereza:customactivityoncrash:2.3.0'
|
||||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
||||||
implementation 'androidx.appcompat:appcompat:1.5.0'
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||||
implementation 'com.google.android.material:material:1.9.0-beta01'
|
implementation 'dev.rikka.rikkax.appcompat:appcompat:1.6.1'
|
||||||
|
implementation 'com.google.android.material:material:1.9.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
|
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
|
||||||
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
|
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
|
||||||
|
|
|
@ -638,11 +638,11 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
|
||||||
*/
|
*/
|
||||||
fun loadMineBookmarksMenu() {
|
fun loadMineBookmarksMenu() {
|
||||||
if (this::menuBinding.isInitialized) {
|
if (this::menuBinding.isInitialized) {
|
||||||
menuBinding.mineBookmarksMenu.subMenu.clear()
|
menuBinding.mineBookmarksMenu.subMenu?.clear()
|
||||||
viewModel.getBookmarkManager().fromList(object : BookmarkListener {
|
viewModel.getBookmarkManager().fromList(object : BookmarkListener {
|
||||||
override fun find(path: String, name: String) {
|
override fun find(path: String, name: String) {
|
||||||
val item = menuBinding.mineBookmarksMenu.subMenu.add(name)
|
val item = menuBinding.mineBookmarksMenu.subMenu?.add(name)
|
||||||
item.setOnMenuItemClickListener {
|
item?.setOnMenuItemClickListener {
|
||||||
viewModel.currentPathLiveData.value = path
|
viewModel.currentPathLiveData.value = path
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ import com.coldmint.rust.pro.databinding.HeadLayoutBinding
|
||||||
import com.coldmint.rust.pro.fragments.UserGroupFragment
|
import com.coldmint.rust.pro.fragments.UserGroupFragment
|
||||||
import com.coldmint.rust.pro.tool.EventRecord
|
import com.coldmint.rust.pro.tool.EventRecord
|
||||||
import com.coldmint.rust.pro.viewmodel.StartViewModel
|
import com.coldmint.rust.pro.viewmodel.StartViewModel
|
||||||
|
import com.google.android.material.color.DynamicColors
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import com.google.android.material.tabs.TabLayout
|
import com.google.android.material.tabs.TabLayout
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
|
@ -56,6 +57,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||||
private lateinit var appBarConfiguration: AppBarConfiguration
|
private lateinit var appBarConfiguration: AppBarConfiguration
|
||||||
private var oldLanguage: String? = null
|
private var oldLanguage: String? = null
|
||||||
private var first = true
|
private var first = true
|
||||||
|
var oldDynamicColor = false
|
||||||
var tabLayout: TabLayout? = null
|
var tabLayout: TabLayout? = null
|
||||||
val headLayout by lazy {
|
val headLayout by lazy {
|
||||||
HeadLayoutBinding.inflate(layoutInflater)
|
HeadLayoutBinding.inflate(layoutInflater)
|
||||||
|
@ -238,6 +240,14 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||||
if (first) {
|
if (first) {
|
||||||
first = false
|
first = false
|
||||||
} else {
|
} else {
|
||||||
|
val newDynamicColor = AppSettings.getValue(
|
||||||
|
AppSettings.Setting.DynamicColor,
|
||||||
|
DynamicColors.isDynamicColorAvailable()
|
||||||
|
);
|
||||||
|
if (oldDynamicColor != newDynamicColor) {
|
||||||
|
recreate()
|
||||||
|
return
|
||||||
|
}
|
||||||
val newLanguage = AppSettings.getValue(AppSettings.Setting.AppLanguage, "en")
|
val newLanguage = AppSettings.getValue(AppSettings.Setting.AppLanguage, "en")
|
||||||
if (oldLanguage != newLanguage) {
|
if (oldLanguage != newLanguage) {
|
||||||
recreate()
|
recreate()
|
||||||
|
@ -269,7 +279,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||||
// }
|
// }
|
||||||
val gitHub = menu.findItem(R.id.github)
|
val gitHub = menu.findItem(R.id.github)
|
||||||
gitHub.setOnMenuItemClickListener {
|
gitHub.setOnMenuItemClickListener {
|
||||||
AppOperator.useBrowserAccessWebPage(this,"https://github.com/Cold-Mint/RustAssistant")
|
AppOperator.useBrowserAccessWebPage(this, "https://github.com/Cold-Mint/RustAssistant")
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
// val help = menu.findItem(R.id.help)
|
// val help = menu.findItem(R.id.help)
|
||||||
|
@ -315,11 +325,13 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||||
intent.putExtra("type", "mod")
|
intent.putExtra("type", "mod")
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
templateItem -> {
|
templateItem -> {
|
||||||
val intent = Intent(this, CreationWizardActivity::class.java)
|
val intent = Intent(this, CreationWizardActivity::class.java)
|
||||||
intent.putExtra("type", "template")
|
intent.putExtra("type", "template")
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -721,6 +733,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||||
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
||||||
if (canUseView) {
|
if (canUseView) {
|
||||||
oldLanguage = AppSettings.getValue(AppSettings.Setting.AppLanguage, "en")
|
oldLanguage = AppSettings.getValue(AppSettings.Setting.AppLanguage, "en")
|
||||||
|
oldDynamicColor = AppSettings.getValue(
|
||||||
|
AppSettings.Setting.DynamicColor,
|
||||||
|
DynamicColors.isDynamicColorAvailable()
|
||||||
|
);
|
||||||
useToolbarSetSupportActionBar()
|
useToolbarSetSupportActionBar()
|
||||||
initNav()
|
initNav()
|
||||||
observeStartViewModel()
|
observeStartViewModel()
|
||||||
|
|
|
@ -18,9 +18,11 @@ import com.coldmint.rust.pro.databinding.ActivitySettingsBinding
|
||||||
import com.coldmint.rust.pro.tool.GlobalMethod
|
import com.coldmint.rust.pro.tool.GlobalMethod
|
||||||
import com.google.android.material.color.DynamicColors
|
import com.google.android.material.color.DynamicColors
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import rikka.material.preference.MaterialSwitchPreference
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.collections.ArrayList
|
import kotlin.collections.ArrayList
|
||||||
|
@ -53,49 +55,58 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val english_editing_mode =
|
val english_editing_mode =
|
||||||
manager.findPreference<SwitchPreference>(requireContext().getString(R.string.setting_english_editing_mode))
|
manager.findPreference<MaterialSwitchPreference>(requireContext().getString(R.string.setting_english_editing_mode))
|
||||||
|
|
||||||
val customizeEdit = manager.findPreference<PreferenceScreen>("customize_edit")
|
val customizeEdit = manager.findPreference<Preference>("customize_edit")
|
||||||
customizeEdit!!.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
customizeEdit!!.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||||
val intent = Intent(requireContext(), CustomizeEditTextActivity::class.java)
|
val intent = Intent(requireContext(), CustomizeEditTextActivity::class.java)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
val clipboardCue = manager.findPreference<SwitchPreference>(requireContext().getString(R.string.setting_clipboard_cue))
|
val clipboardCue =
|
||||||
|
manager.findPreference<MaterialSwitchPreference>(requireContext().getString(R.string.setting_clipboard_cue))
|
||||||
// Only show a toast for Android 12 and lower.
|
// Only show a toast for Android 12 and lower.
|
||||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2){
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) {
|
||||||
//如果是安卓12或更低
|
//如果是安卓12或更低
|
||||||
clipboardCue?.isEnabled = false
|
clipboardCue?.isEnabled = false
|
||||||
}
|
}
|
||||||
val dynamicColor =
|
val dynamicColor =
|
||||||
manager.findPreference<SwitchPreference>(requireContext().getString(R.string.setting_dynamic_color))
|
manager.findPreference<MaterialSwitchPreference>(requireContext().getString(R.string.setting_dynamic_color))
|
||||||
if (!DynamicColors.isDynamicColorAvailable()) {
|
if (!DynamicColors.isDynamicColorAvailable()) {
|
||||||
//动态颜色不可用
|
//动态颜色不可用
|
||||||
dynamicColor?.summary = getString(R.string.dynamic_color_disabled)
|
dynamicColor?.summary = getString(R.string.dynamic_color_disabled)
|
||||||
dynamicColor?.isEnabled = false
|
dynamicColor?.isEnabled = false
|
||||||
}
|
}
|
||||||
|
dynamicColor?.setOnPreferenceChangeListener { preference, newValue ->
|
||||||
|
if (newValue is Boolean) {
|
||||||
|
if (AppSettings.getValue(AppSettings.Setting.DynamicColor, DynamicColors.isDynamicColorAvailable()) != newValue) {
|
||||||
|
activity?.recreate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
val errorInfo =
|
val errorInfo =
|
||||||
manager.findPreference<PreferenceScreen>(requireContext().getString(R.string.setting_see_error_info))
|
manager.findPreference<Preference>(requireContext().getString(R.string.setting_see_error_info))
|
||||||
errorInfo!!.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
errorInfo!!.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||||
startActivity(Intent(context, ErrorInfoActivity::class.java))
|
startActivity(Intent(context, ErrorInfoActivity::class.java))
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
// val obtainSourceCode = manager.findPreference<PreferenceScreen>(requireContext().getString(R.string.setting_obtain_source_code))
|
// val obtainSourceCode = manager.findPreference<Preference>(requireContext().getString(R.string.setting_obtain_source_code))
|
||||||
// obtainSourceCode!!.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
// obtainSourceCode!!.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||||
// AppOperator.useBrowserAccessWebPage(requireContext(),"https://github.com/Cold-Mint/RustAssistant")
|
// AppOperator.useBrowserAccessWebPage(requireContext(),"https://github.com/Cold-Mint/RustAssistant")
|
||||||
// true
|
// true
|
||||||
// }
|
// }
|
||||||
|
|
||||||
val game = manager.findPreference<PreferenceScreen>("set_game_pack")
|
val game = manager.findPreference<Preference>("set_game_pack")
|
||||||
game!!.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
game!!.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||||
startActivity(Intent(context, ApplicationListActivity::class.java))
|
startActivity(Intent(context, ApplicationListActivity::class.java))
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
val valueTypeManager =
|
val valueTypeManager =
|
||||||
manager.findPreference<PreferenceScreen>("value_type_manager")
|
manager.findPreference<Preference>("value_type_manager")
|
||||||
valueTypeManager!!.onPreferenceClickListener =
|
valueTypeManager!!.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
val intent = Intent(context, ValueTypeActivity::class.java)
|
val intent = Intent(context, ValueTypeActivity::class.java)
|
||||||
|
@ -103,7 +114,7 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
val openRecoveryStation =
|
val openRecoveryStation =
|
||||||
manager.findPreference<PreferenceScreen>("open_recovery_station")
|
manager.findPreference<Preference>("open_recovery_station")
|
||||||
openRecoveryStation!!.onPreferenceClickListener =
|
openRecoveryStation!!.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
startActivity(Intent(context, RecyclingStationActivity::class.java))
|
startActivity(Intent(context, RecyclingStationActivity::class.java))
|
||||||
|
@ -111,7 +122,7 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val clearCache =
|
val clearCache =
|
||||||
manager.findPreference<PreferenceScreen>(getString(R.string.setting_clear_cache))
|
manager.findPreference<Preference>(getString(R.string.setting_clear_cache))
|
||||||
clearCache!!.onPreferenceClickListener =
|
clearCache!!.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
val items = ArrayList<String>()
|
val items = ArrayList<String>()
|
||||||
|
@ -143,10 +154,12 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
|
||||||
Glide.get(requireContext()).clearMemory()
|
Glide.get(requireContext()).clearMemory()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getString(R.string.code_cache) -> {
|
getString(R.string.code_cache) -> {
|
||||||
FileOperator.delete_files(requireContext().codeCacheDir)
|
FileOperator.delete_files(requireContext().codeCacheDir)
|
||||||
FileOperator.delete_files(requireContext().cacheDir)
|
FileOperator.delete_files(requireContext().cacheDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
getString(R.string.history_cache) -> {
|
getString(R.string.history_cache) -> {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
FileOperator.delete_files(File(requireActivity().applicationContext.dataDir.absolutePath + "/databases"))
|
FileOperator.delete_files(File(requireActivity().applicationContext.dataDir.absolutePath + "/databases"))
|
||||||
|
@ -179,8 +192,8 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
val nightMode: SwitchPreference? =
|
val nightMode: MaterialSwitchPreference? =
|
||||||
manager.findPreference<SwitchPreference>(getString(R.string.setting_night_mode))
|
manager.findPreference<MaterialSwitchPreference>(getString(R.string.setting_night_mode))
|
||||||
nightMode?.setOnPreferenceChangeListener { preference, newValue ->
|
nightMode?.setOnPreferenceChangeListener { preference, newValue ->
|
||||||
val booleanValue = newValue as Boolean
|
val booleanValue = newValue as Boolean
|
||||||
if (booleanValue) {
|
if (booleanValue) {
|
||||||
|
@ -192,8 +205,8 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val nightModeFollowSystem: SwitchPreference? =
|
val nightModeFollowSystem: MaterialSwitchPreference? =
|
||||||
manager.findPreference<SwitchPreference>(getString(R.string.setting_night_mode_follow_system))
|
manager.findPreference<MaterialSwitchPreference>(getString(R.string.setting_night_mode_follow_system))
|
||||||
nightModeFollowSystem?.setOnPreferenceChangeListener { preference, newValue ->
|
nightModeFollowSystem?.setOnPreferenceChangeListener { preference, newValue ->
|
||||||
if (nightMode != null) {
|
if (nightMode != null) {
|
||||||
val useValue = newValue as Boolean
|
val useValue = newValue as Boolean
|
||||||
|
@ -232,7 +245,7 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val useCommunity =
|
val useCommunity =
|
||||||
manager.findPreference<SwitchPreference>(getString(R.string.setting_use_the_community_as_the_launch_page))
|
manager.findPreference<MaterialSwitchPreference>(getString(R.string.setting_use_the_community_as_the_launch_page))
|
||||||
if (useCommunity != null) {
|
if (useCommunity != null) {
|
||||||
useCommunity.isVisible = false
|
useCommunity.isVisible = false
|
||||||
}
|
}
|
||||||
|
@ -252,6 +265,10 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
|
||||||
|
|
||||||
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
||||||
if (canUseView) {
|
if (canUseView) {
|
||||||
|
this.getTheme().applyStyle(
|
||||||
|
rikka.material.preference.R.style.ThemeOverlay_Rikka_Material3_Preference,
|
||||||
|
true
|
||||||
|
);
|
||||||
title = getString(R.string.set_up)
|
title = getString(R.string.set_up)
|
||||||
setReturnButton()
|
setReturnButton()
|
||||||
val settingsFragment = SettingsFragment()
|
val settingsFragment = SettingsFragment()
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
|
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
|
||||||
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
|
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
|
||||||
<item name="popupMenuStyle">@style/Widget.Material3.PopupMenu</item>
|
<item name="popupMenuStyle">@style/Widget.Material3.PopupMenu</item>
|
||||||
|
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Rikka.Material3</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,6 +72,7 @@
|
||||||
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
|
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
|
||||||
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
|
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
|
||||||
<item name="colorPrimaryInverse">@color/md_theme_dark_inversePrimary</item>
|
<item name="colorPrimaryInverse">@color/md_theme_dark_inversePrimary</item>
|
||||||
|
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Rikka.Material3</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!--设置标签为小写-->
|
<!--设置标签为小写-->
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
app:title="@string/reply_title"
|
app:title="@string/reply_title"
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:summary="@string/clipboard_cue_tip"
|
android:summary="@string/clipboard_cue_tip"
|
||||||
android:title="@string/clipboard_cue"
|
android:title="@string/clipboard_cue"
|
||||||
|
@ -24,28 +24,28 @@
|
||||||
<PreferenceCategory android:title="@string/appearance">
|
<PreferenceCategory android:title="@string/appearance">
|
||||||
|
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:summary="@string/dynamic_color_tip"
|
android:summary="@string/dynamic_color_tip"
|
||||||
android:title="@string/dynamic_color"
|
android:title="@string/dynamic_color"
|
||||||
app:key="@string/setting_dynamic_color"
|
app:key="@string/setting_dynamic_color"
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
android:title="@string/night_mode_follow_system"
|
android:title="@string/night_mode_follow_system"
|
||||||
app:defaultValue="true"
|
app:defaultValue="true"
|
||||||
app:key="@string/setting_night_mode_follow_system"
|
app:key="@string/setting_night_mode_follow_system"
|
||||||
app:summary="@string/night_mode_follow_system_tip"
|
app:summary="@string/night_mode_follow_system_tip"
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
android:title="@string/night_mode"
|
android:title="@string/night_mode"
|
||||||
app:defaultValue="false"
|
app:defaultValue="false"
|
||||||
app:key="@string/setting_night_mode"
|
app:key="@string/setting_night_mode"
|
||||||
app:summary="@string/night_mode_auto"
|
app:summary="@string/night_mode_auto"
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
android:title="@string/use_the_community_as_the_launch_page"
|
android:title="@string/use_the_community_as_the_launch_page"
|
||||||
app:defaultValue="true"
|
app:defaultValue="true"
|
||||||
app:key="@string/setting_use_the_community_as_the_launch_page"
|
app:key="@string/setting_use_the_community_as_the_launch_page"
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<PreferenceCategory android:title="@string/data_transfer">
|
<PreferenceCategory android:title="@string/data_transfer">
|
||||||
|
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
android:title="@string/using_mobile_networks"
|
android:title="@string/using_mobile_networks"
|
||||||
app:defaultValue="false"
|
app:defaultValue="false"
|
||||||
app:key="@string/setting_use_mobile_network"
|
app:key="@string/setting_use_mobile_network"
|
||||||
|
@ -91,13 +91,13 @@
|
||||||
app:key="editGroup"
|
app:key="editGroup"
|
||||||
app:title="@string/edit_title">
|
app:title="@string/edit_title">
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
app:defaultValue="false"
|
app:defaultValue="false"
|
||||||
app:key="@string/setting_english_editing_mode"
|
app:key="@string/setting_english_editing_mode"
|
||||||
app:summary="@string/english_editing_mode_describe"
|
app:summary="@string/english_editing_mode_describe"
|
||||||
app:title="@string/english_editing_mode" />
|
app:title="@string/english_editing_mode" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
app:defaultValue="true"
|
app:defaultValue="true"
|
||||||
app:key="@string/setting_use_jetBrains_mono_font"
|
app:key="@string/setting_use_jetBrains_mono_font"
|
||||||
app:summary="@string/use_jetBrains_mono_font_describe"
|
app:summary="@string/use_jetBrains_mono_font_describe"
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
app:title="@string/custom_symbol"
|
app:title="@string/custom_symbol"
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="@string/setting_simple_display_of_auto_complete_menu"
|
android:key="@string/setting_simple_display_of_auto_complete_menu"
|
||||||
android:title="@string/simple_display_of_auto_complete_menu"
|
android:title="@string/simple_display_of_auto_complete_menu"
|
||||||
|
@ -122,13 +122,13 @@
|
||||||
app:title="@string/identifiers_prompt_number"
|
app:title="@string/identifiers_prompt_number"
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
app:defaultValue="true"
|
app:defaultValue="true"
|
||||||
app:key="@string/setting_auto_save"
|
app:key="@string/setting_auto_save"
|
||||||
app:summary="@string/auto_save_describe"
|
app:summary="@string/auto_save_describe"
|
||||||
app:title="@string/auto_save" />
|
app:title="@string/auto_save" />
|
||||||
|
|
||||||
<PreferenceScreen
|
<Preference
|
||||||
app:key="customize_edit"
|
app:key="customize_edit"
|
||||||
app:title="@string/customize_edit_text"
|
app:title="@string/customize_edit_text"
|
||||||
app:summary="@string/customize_edit_text_description"/>
|
app:summary="@string/customize_edit_text_description"/>
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
app:key="gamePackGroup"
|
app:key="gamePackGroup"
|
||||||
app:title="@string/game_pack">
|
app:title="@string/game_pack">
|
||||||
|
|
||||||
<PreferenceScreen
|
<Preference
|
||||||
app:key="set_game_pack"
|
app:key="set_game_pack"
|
||||||
app:summary="@string/select_the_game_package_description"
|
app:summary="@string/select_the_game_package_description"
|
||||||
app:title="@string/select_the_game_pack" />
|
app:title="@string/select_the_game_pack" />
|
||||||
|
@ -157,14 +157,14 @@
|
||||||
app:title="@string/mod_folder"
|
app:title="@string/mod_folder"
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
app:defaultValue="true"
|
app:defaultValue="true"
|
||||||
app:key="@string/setting_auto_create_nomedia"
|
app:key="@string/setting_auto_create_nomedia"
|
||||||
app:summaryOff="@string/auto_create_nomedia_off"
|
app:summaryOff="@string/auto_create_nomedia_off"
|
||||||
app:summaryOn="@string/auto_create_nomedia_on"
|
app:summaryOn="@string/auto_create_nomedia_on"
|
||||||
app:title="@string/auto_create_nomedia" />
|
app:title="@string/auto_create_nomedia" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
app:defaultValue="true"
|
app:defaultValue="true"
|
||||||
app:key="@string/setting_keep_rwmod_file"
|
app:key="@string/setting_keep_rwmod_file"
|
||||||
app:summary="@string/keep_rwmod_file_description"
|
app:summary="@string/keep_rwmod_file_description"
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
app:defaultValue="true"
|
app:defaultValue="true"
|
||||||
app:key="@string/setting_enable_recovery_station"
|
app:key="@string/setting_enable_recovery_station"
|
||||||
app:summary="@string/description_of_the_recovery_station"
|
app:summary="@string/description_of_the_recovery_station"
|
||||||
|
@ -197,13 +197,13 @@
|
||||||
app:title="@string/recovery_station_file_save_days"
|
app:title="@string/recovery_station_file_save_days"
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
|
||||||
<PreferenceScreen
|
<Preference
|
||||||
app:dependency="@string/setting_enable_recovery_station"
|
app:dependency="@string/setting_enable_recovery_station"
|
||||||
app:key="open_recovery_station"
|
app:key="open_recovery_station"
|
||||||
app:summary="@string/description_of_manage_the_recovery_station"
|
app:summary="@string/description_of_manage_the_recovery_station"
|
||||||
app:title="@string/manage_the_recovery_station" />
|
app:title="@string/manage_the_recovery_station" />
|
||||||
|
|
||||||
<PreferenceScreen
|
<Preference
|
||||||
app:key="value_type_manager"
|
app:key="value_type_manager"
|
||||||
app:summary="@string/value_type_manager_describe"
|
app:summary="@string/value_type_manager_describe"
|
||||||
app:title="@string/value_type_manager" />
|
app:title="@string/value_type_manager" />
|
||||||
|
@ -225,14 +225,14 @@
|
||||||
app:key="templateGroup"
|
app:key="templateGroup"
|
||||||
app:title="@string/template_title">
|
app:title="@string/template_title">
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
app:defaultValue="false"
|
app:defaultValue="false"
|
||||||
app:key="@string/setting_only_load_conant_language_temple"
|
app:key="@string/setting_only_load_conant_language_temple"
|
||||||
app:summaryOff="@string/only_load_coniant_language_template_off"
|
app:summaryOff="@string/only_load_coniant_language_template_off"
|
||||||
app:summaryOn="@string/only_load_coniant_language_template_off"
|
app:summaryOn="@string/only_load_coniant_language_template_off"
|
||||||
app:title="@string/only_load_coniant_language_template" />
|
app:title="@string/only_load_coniant_language_template" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
app:defaultValue="true"
|
app:defaultValue="true"
|
||||||
app:key="@string/setting_independent_folder"
|
app:key="@string/setting_independent_folder"
|
||||||
app:summary="@string/independent_folder_description"
|
app:summary="@string/independent_folder_description"
|
||||||
|
@ -243,13 +243,13 @@
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/update_and_iteration"
|
android:title="@string/update_and_iteration"
|
||||||
app:key="updateGroup">
|
app:key="updateGroup">
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
app:defaultValue="false"
|
app:defaultValue="false"
|
||||||
app:key="@string/setting_check_beta_update"
|
app:key="@string/setting_check_beta_update"
|
||||||
app:summary="@string/check_beta_update_describe"
|
app:summary="@string/check_beta_update_describe"
|
||||||
app:title="@string/check_beta_update" />
|
app:title="@string/check_beta_update" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="@string/setting_experience_the_plan"
|
android:key="@string/setting_experience_the_plan"
|
||||||
app:summary="@string/experience_the_plan_describe"
|
app:summary="@string/experience_the_plan_describe"
|
||||||
|
@ -261,7 +261,7 @@
|
||||||
app:key="cacheGroup"
|
app:key="cacheGroup"
|
||||||
app:title="@string/cache">
|
app:title="@string/cache">
|
||||||
|
|
||||||
<PreferenceScreen
|
<Preference
|
||||||
app:key="@string/setting_clear_cache"
|
app:key="@string/setting_clear_cache"
|
||||||
app:summary="@string/clear_cache_description"
|
app:summary="@string/clear_cache_description"
|
||||||
app:title="@string/clear_cache" />
|
app:title="@string/clear_cache" />
|
||||||
|
@ -272,17 +272,17 @@
|
||||||
app:key="developerModeGroup"
|
app:key="developerModeGroup"
|
||||||
app:title="@string/sync_header">
|
app:title="@string/sync_header">
|
||||||
|
|
||||||
<!-- <PreferenceScreen-->
|
<!-- <Preference-->
|
||||||
<!-- app:key="@string/setting_obtain_source_code"-->
|
<!-- app:key="@string/setting_obtain_source_code"-->
|
||||||
<!-- android:summary="@string/obtain_source_code_msg"-->
|
<!-- android:summary="@string/obtain_source_code_msg"-->
|
||||||
<!-- app:title="@string/obtain_source_code"/>-->
|
<!-- app:title="@string/obtain_source_code"/>-->
|
||||||
|
|
||||||
<PreferenceScreen
|
<Preference
|
||||||
app:key="@string/setting_see_error_info"
|
app:key="@string/setting_see_error_info"
|
||||||
app:summary="@string/see_error_info_tip"
|
app:summary="@string/see_error_info_tip"
|
||||||
app:title="@string/see_error_info" />
|
app:title="@string/see_error_info" />
|
||||||
|
|
||||||
<SwitchPreference
|
<rikka.material.preference.MaterialSwitchPreference
|
||||||
app:key="@string/setting_developer_mode"
|
app:key="@string/setting_developer_mode"
|
||||||
app:summaryOff="@string/developers_mode_off"
|
app:summaryOff="@string/developers_mode_off"
|
||||||
app:summaryOn="@string/developers_mode_on"
|
app:summaryOn="@string/developers_mode_on"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user