diff --git a/src/main/kotlin/com/looker/droidify/content/Preferences.kt b/src/main/kotlin/com/looker/droidify/content/Preferences.kt index a0d8d6e2..5c2eb050 100644 --- a/src/main/kotlin/com/looker/droidify/content/Preferences.kt +++ b/src/main/kotlin/com/looker/droidify/content/Preferences.kt @@ -17,7 +17,7 @@ object Preferences { private val keys = sequenceOf( Key.AutoSync, Key.IncompatibleVersions, Key.ProxyHost, Key.ProxyPort, Key.ProxyType, - Key.SortOrder, Key.Theme, Key.UpdateNotify, Key.UpdateUnstable + Key.RootPermission, Key.SortOrder, Key.Theme, Key.UpdateNotify, Key.UpdateUnstable ).map { Pair(it.name, it) }.toMap() fun init(context: Context) { @@ -124,6 +124,8 @@ object Preferences { Value.EnumerationValue(Preferences.ProxyType.Direct) ) + object RootPermission : Key("root_permission", Value.BooleanValue(false)) + object SortOrder : Key( "sort_order", Value.EnumerationValue(Preferences.SortOrder.Update) diff --git a/src/main/kotlin/com/looker/droidify/screen/SettingsFragment.kt b/src/main/kotlin/com/looker/droidify/screen/SettingsFragment.kt index 7cd2a533..b59d78b7 100644 --- a/src/main/kotlin/com/looker/droidify/screen/SettingsFragment.kt +++ b/src/main/kotlin/com/looker/droidify/screen/SettingsFragment.kt @@ -83,6 +83,10 @@ class SettingsFragment : ScreenFragment() { Preferences.Key.UpdateUnstable, getString(R.string.unstable_updates), getString(R.string.unstable_updates_summary) ) + addSwitch( + Preferences.Key.IncompatibleVersions, getString(R.string.incompatible_versions), + getString(R.string.incompatible_versions_summary) + ) } preferences.addCategory(getString(R.string.proxy)) { addEnumeration(Preferences.Key.ProxyType, getString(R.string.proxy_type)) { @@ -95,7 +99,7 @@ class SettingsFragment : ScreenFragment() { addEditString(Preferences.Key.ProxyHost, getString(R.string.proxy_host)) addEditInt(Preferences.Key.ProxyPort, getString(R.string.proxy_port), 1..65535) } - preferences.addCategory(getString(R.string.other)) { + preferences.addCategory(getString(R.string.themes)) { addEnumeration(Preferences.Key.Theme, getString(R.string.theme)) { when (it) { is Preferences.Theme.System -> getString(R.string.system) @@ -104,13 +108,14 @@ class SettingsFragment : ScreenFragment() { is Preferences.Theme.Amoled -> getString(R.string.amoled) } } + } + preferences.addCategory(getString(R.string.install_types)) { addSwitch( - Preferences.Key.IncompatibleVersions, getString(R.string.incompatible_versions), - getString(R.string.incompatible_versions_summary) + Preferences.Key.RootPermission, getString(R.string.root_permission), + getString(R.string.root_permission_description) ) } - - preferences.addCategory("Credits") { + preferences.addCategory(getString(R.string.credits)) { addText( title = "Based on an App by kitsunyan", summary = "FoxyDroid" diff --git a/src/main/res/values-pt-rBR/strings.xml b/src/main/res/values-pt-rBR/strings.xml index b1c7a49f..5a950cf7 100644 --- a/src/main/res/values-pt-rBR/strings.xml +++ b/src/main/res/values-pt-rBR/strings.xml @@ -155,15 +155,18 @@ Não verificado Atualização Atualizações - O código fonte original não é livre - Nome de usuário - Falta o nome de usuário - O índice não pôde ser validado. - Versão %s - Versões - Esperando para começar a baixar - Página web - Instalação silenciosa - Permitir permissão de root para habilitar a instalação silenciosa + O código fonte original não é livre + Nome de usuário + Falta o nome de usuário + O índice não pôde ser validado. + Versão %s + Versões + Esperando para começar a baixar + Página web + Instalação silenciosa + Permitir permissão de root para habilitar a instalação silenciosa + Temas + Créditos + themes Tipos de instalação diff --git a/src/main/res/values-zh-rCN/strings.xml b/src/main/res/values-zh-rCN/strings.xml index 13a4db4b..b08938d5 100644 --- a/src/main/res/values-zh-rCN/strings.xml +++ b/src/main/res/values-zh-rCN/strings.xml @@ -155,15 +155,18 @@ 未验证 更新 更新 - 上游源代码不是自由的 - 用户名 - 缺少用户名 - 无法验证索引。 - 版本 %s - 版本 - 等待开始下载 - 网站 - 静默安装 - 允许 Root 权限以启用静默安装 + 上游源代码不是自由的 + 用户名 + 缺少用户名 + 无法验证索引。 + 版本 %s + 版本 + 等待开始下载 + 网站 + 静默安装 + 允许 Root 权限以启用静默安装 + 主题 + 学分 + 安装类型 diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 4f5f3f06..7e606502 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -29,6 +29,7 @@ Could not download %s Could not sync %s Could not validate %s + Credits Dark Date added Delete @@ -64,6 +65,7 @@ Show application versions incompatible with the device Incompatible with %s Install + Installation Types Installed Could not check integrity. Invalid address @@ -147,6 +149,7 @@ System Tap to install. Theme + Themes Tracks or reports your activity Uninstall Unknown @@ -166,5 +169,4 @@ Versions Waiting to start download Website - - + \ No newline at end of file