package com.example.defenseapplication

import android.app.Application
import android.content.Context
import com.blankj.utilcode.util.Utils
import com.example.defenseapplication.utils.LanguageUtil

class MyApplication : Application() {

    override fun onCreate() {
        super.onCreate()
        Utils.init(this)    // 初始化 AndroidUtilCode
    }

    override fun attachBaseContext(base: Context) {
        // 在应用启动时应用语言设置
        val context = LanguageUtil.attachBaseContext(base)
        super.attachBaseContext(context)
    }
}
