Files
SecurityDefenseDevice/app/src/main/java/com/ckkj/defense_device/MyApplication.kt
2026-07-21 10:22:18 +08:00

42 lines
1.4 KiB
Kotlin

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
// _ooOoo_
// o8888888o
// 88" . "88
// (| -_- |)
// O\ = /O
// ____/`---'\____
// . ' \\| |// `.
// / \\||| : |||// \
// / _||||| -:- |||||- \
// | | \\\ - /// | |
// | \_| ''\---/'' | |
// \ .-\__ `-` ___/-. /
// ___`. .' /--.--\ `. . __
// ."" '< `.___\_<|>_/___.' >'"".
// | | : `- \`.;`\ _ /`;.`/ - ` : | |
// \ \ `-. \_ __\ /__ _/ .-` / /
// ======`-.____`-.___\_____/___.-`____.-'======
// `=---='
//
// 佛祖保佑 永无BUG
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)
}
}