mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 18:45:07 +01:00
Add shortcut to change app language in Android 13
This commit is contained in:
parent
267ecce958
commit
538478cac8
@ -17,13 +17,13 @@ shortcutHelper.setFilePath("./shortcuts.xml")
|
|||||||
val SUPPORTED_ABIS = setOf("armeabi-v7a", "arm64-v8a", "x86")
|
val SUPPORTED_ABIS = setOf("armeabi-v7a", "arm64-v8a", "x86")
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk = AndroidConfig.compileSdk
|
compileSdkPreview = "Tiramisu"
|
||||||
ndkVersion = AndroidConfig.ndk
|
ndkVersion = "22.1.7171670"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "eu.kanade.tachiyomi"
|
applicationId = "eu.kanade.tachiyomi"
|
||||||
minSdk = AndroidConfig.minSdk
|
minSdk = 23
|
||||||
targetSdk = AndroidConfig.targetSdk
|
targetSdk = 29
|
||||||
versionCode = 76
|
versionCode = 76
|
||||||
versionName = "0.13.1"
|
versionName = "0.13.1"
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.ui.setting
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
|
import androidx.core.net.toUri
|
||||||
import androidx.preference.PreferenceScreen
|
import androidx.preference.PreferenceScreen
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.util.preference.bindTo
|
import eu.kanade.tachiyomi.util.preference.bindTo
|
||||||
@ -54,5 +55,17 @@ class SettingsGeneralController : SettingsController() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (Build.VERSION.CODENAME == "Tiramisu") {
|
||||||
|
preference {
|
||||||
|
key = "pref_manage_language"
|
||||||
|
titleRes = R.string.pref_app_language
|
||||||
|
onClick {
|
||||||
|
val intent = Intent(Settings.ACTION_APP_LOCALE_SETTINGS).apply {
|
||||||
|
data = "package:${context.packageName}".toUri()
|
||||||
|
}
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,6 +178,7 @@
|
|||||||
<string name="pref_start_screen">Start screen</string>
|
<string name="pref_start_screen">Start screen</string>
|
||||||
<string name="pref_confirm_exit">Confirm exit</string>
|
<string name="pref_confirm_exit">Confirm exit</string>
|
||||||
<string name="pref_manage_notifications">Manage notifications</string>
|
<string name="pref_manage_notifications">Manage notifications</string>
|
||||||
|
<string name="pref_app_language">App language</string>
|
||||||
|
|
||||||
<string name="pref_category_security">Security</string>
|
<string name="pref_category_security">Security</string>
|
||||||
<string name="lock_with_biometrics">Require unlock</string>
|
<string name="lock_with_biometrics">Require unlock</string>
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
object AndroidConfig {
|
|
||||||
const val compileSdk = 31
|
|
||||||
const val minSdk = 23
|
|
||||||
const val targetSdk = 29
|
|
||||||
const val ndk = "22.1.7171670"
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user