Commit 5aee5b23 authored by wanglei's avatar wanglei

...

parent fb582f48
......@@ -9,8 +9,6 @@ import com.base.locationsharewhite.bean.ConstObject.appLanguageSp
import com.base.locationsharewhite.bean.ConstObject.changeLanguageSp
import com.base.locationsharewhite.ui.main.MainActivity
import com.base.locationsharewhite.utils.ActivityLauncher
import com.base.locationsharewhite.utils.LanguageUtils.changeAppLanguage
import com.base.locationsharewhite.utils.LogEx
abstract class BaseActivity<T : ViewBinding> : AppCompatActivity() {
private val TAG = "BaseActivity"
......
......@@ -29,13 +29,13 @@ class MyApplication : Application() {
lateinit var appContext: MyApplication
var splashLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var mainLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var setLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var settingsLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var howUseLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var renameLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var locationMapLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
// var splashLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
// var mainLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
// var setLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
// var settingsLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
// var howUseLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
// var renameLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
// var locationMapLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var umpCanAd: Boolean = true
......
......@@ -22,8 +22,8 @@ class HowUseActivity : BaseActivity<ActivityHowUseBinding>() {
BarUtils.setStatusBarColor(this, Color.WHITE)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
val isRecreate = isLanguageRecreate(MyApplication.mainLanguage)
if (isRecreate) return
// val isRecreate = isLanguageRecreate(MyApplication.mainLanguage)
// if (isRecreate) return
}
override fun initListener() {
......@@ -44,12 +44,12 @@ class HowUseActivity : BaseActivity<ActivityHowUseBinding>() {
override fun onResume() {
super.onResume()
val isRecreate = updateAppLanguage(MyApplication.howUseLanguage, TAG) {
MyApplication.howUseLanguage = it
}
if (isRecreate) {
return
}
// val isRecreate = updateAppLanguage(MyApplication.howUseLanguage, TAG) {
// MyApplication.howUseLanguage = it
// }
// if (isRecreate) {
// return
// }
}
}
\ No newline at end of file
......@@ -70,9 +70,9 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
// binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
locationPresenter = LocationPresenter(this, lifecycleScope)
if (isLanguageRecreate(MyApplication.locationMapLanguage)) {
return
}
// if (isLanguageRecreate(MyApplication.locationMapLanguage)) {
// return
// }
val mapFragment =
supportFragmentManager.findFragmentById(R.id.map) as SupportMapFragment?
......@@ -195,9 +195,9 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
override fun initListener() {
super.initListener()
if (isLanguageRecreate(MyApplication.locationMapLanguage)) {
return
}
// if (isLanguageRecreate(MyApplication.locationMapLanguage)) {
// return
// }
onBackPressedDispatcher.addCallback {
finishToMain()
}
......@@ -410,12 +410,12 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
override fun onResume() {
super.onResume()
val isRecreate = updateAppLanguage(MyApplication.locationMapLanguage) {
MyApplication.locationMapLanguage = it
}
if (isRecreate) {
return
}
// val isRecreate = updateAppLanguage(MyApplication.locationMapLanguage) {
// MyApplication.locationMapLanguage = it
// }
// if (isRecreate) {
// return
// }
StayJobService.getGoogleServiceLocationDelay = 30
if (!checkLocationPermission() || !checkBackgroundLocationPermission()) {
......
......@@ -64,9 +64,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
if (isLanguageRecreate(MyApplication.mainLanguage)) {
return
}
// if (isLanguageRecreate(MyApplication.mainLanguage)) {
// return
// }
mainPresenter = MainPresenter(this)
actionId = intent.extras?.getInt("actionId")
......@@ -101,12 +101,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
override fun onResume() {
super.onResume()
val isRecreate = updateAppLanguage(MyApplication.mainLanguage, TAG) {
MyApplication.mainLanguage = it
}
if (isRecreate) {
return
}
// val isRecreate = updateAppLanguage(MyApplication.mainLanguage, TAG) {
// MyApplication.mainLanguage = it
// }
// if (isRecreate) {
// return
// }
mainPresenter.startLocationJob(lifecycleScope)
showAllowAllTimeDialog()
......@@ -146,9 +146,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
override fun initListener() {
super.initListener()
if (isLanguageRecreate(MyApplication.mainLanguage)) {
return
}
// if (isLanguageRecreate(MyApplication.mainLanguage)) {
// return
// }
onBackPressedDispatcher.addCallback {
showAppExitDialog()
}
......
......@@ -85,12 +85,12 @@ class LanguageActivity : BaseActivity<ActivityLanguageBinding>() {
override fun onResume() {
super.onResume()
val isRecreate = updateAppLanguage(MyApplication.setLanguage, TAG) {
MyApplication.setLanguage = it
}
if (isRecreate) {
return
}
// val isRecreate = updateAppLanguage(MyApplication.setLanguage, TAG) {
// MyApplication.setLanguage = it
// }
// if (isRecreate) {
// return
// }
}
}
\ No newline at end of file
......@@ -151,12 +151,12 @@ class RenameActivity : BaseActivity<ActivityRenameBinding>() {
override fun onResume() {
super.onResume()
val isRecreate = updateAppLanguage(MyApplication.renameLanguage, TAG) {
MyApplication.renameLanguage = it
}
if (isRecreate) {
return
}
// val isRecreate = updateAppLanguage(MyApplication.renameLanguage, TAG) {
// MyApplication.renameLanguage = it
// }
// if (isRecreate) {
// return
// }
}
}
\ No newline at end of file
......@@ -62,12 +62,12 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
override fun onResume() {
super.onResume()
val isRecreate = updateAppLanguage(MyApplication.settingsLanguage, TAG) {
MyApplication.settingsLanguage = it
}
if (isRecreate) {
return
}
// val isRecreate = updateAppLanguage(MyApplication.settingsLanguage, TAG) {
// MyApplication.settingsLanguage = it
// }
// if (isRecreate) {
// return
// }
LocationLoginUtils.login()
LocationLoginUtils.loginCallBack = {
runOnUiThread {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment