修改包名
This commit is contained in:
21
app/src/main/java/com/ckkj/defense_device/MyApplication.kt
Normal file
21
app/src/main/java/com/ckkj/defense_device/MyApplication.kt
Normal file
@@ -0,0 +1,21 @@
|
||||
package com.ckkj.defense_device
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
import com.blankj.utilcode.util.Utils
|
||||
import com.ckkj.defense_device.utils.LanguageUtil
|
||||
|
||||
class MyApplication : Application() {
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
Utils.init(this) // 初始化 AndroidUtilCode
|
||||
LanguageUtil.init(this)
|
||||
}
|
||||
|
||||
override fun attachBaseContext(base: Context) {
|
||||
// 在应用启动时应用语言设置
|
||||
val context = LanguageUtil.attachBaseContext(base)
|
||||
super.attachBaseContext(context)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user