Fix locale settings

AppCompatActivity changed its impl again...
This commit is contained in:
topjohnwu 2019-06-08 02:11:10 -07:00
parent 0293eb5c51
commit 86c4928e0f

View File

@ -1,5 +1,6 @@
package com.topjohnwu.magisk.ui.base package com.topjohnwu.magisk.ui.base
import android.content.Context
import android.content.Intent import android.content.Intent
import android.content.res.Configuration import android.content.res.Configuration
import android.os.Bundle import android.os.Bundle
@ -66,6 +67,10 @@ abstract class MagiskActivity<ViewModel : MagiskViewModel, Binding : ViewDataBin
super.applyOverrideConfiguration(config) super.applyOverrideConfiguration(config)
} }
override fun attachBaseContext(base: Context) {
super.attachBaseContext(LocaleManager.getLocaleContext(base, LocaleManager.locale))
}
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
navigationController?.apply { navigationController?.apply {