fix color

This commit is contained in:
Bnyro 2022-07-06 16:07:27 +02:00
parent 8a9f86a91a
commit 72f37e6481
2 changed files with 3 additions and 2 deletions

View File

@ -12,6 +12,7 @@ class NoInternetActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
DynamicColors.applyToActivityIfAvailable(this)
ThemeHelper.updateTheme(this)
super.onCreate(savedInstanceState)
binding = ActivityNointernetBinding.inflate(layoutInflater)
binding.retryButton.setOnClickListener {

View File

@ -15,12 +15,12 @@ object LocaleHelper {
}
private fun setLanguage(context: Context, languageName: String) {
val locale = if (languageName != "sys" && "$languageName".length < 3) {
val locale : Locale? = if (languageName == "sys" && "$languageName".length < 3) {
Locale(languageName)
} else if ("$languageName".length > 3) {
Locale(languageName?.substring(0, 2), languageName?.substring(4, 6))
} else {
Locale.getDefault()
null
}
// Change API Language
Locale.setDefault(locale)