mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-04 02:05:16 +08:00
Added system version text click notice dialog in MainActivity
This commit is contained in:
@@ -42,14 +42,16 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
|
/** 系统版本 */
|
||||||
|
private val systemVersion = "${Build.VERSION.RELEASE} (API ${Build.VERSION.SDK_INT}) ${Build.DISPLAY}"
|
||||||
|
|
||||||
/** 模块是否有效 */
|
/** 模块是否有效 */
|
||||||
var isModuleValied = false
|
var isModuleValied = false
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
binding.mainTextVersion.text = LocaleString.moduleVersion(BuildConfig.VERSION_NAME)
|
binding.mainTextVersion.text = LocaleString.moduleVersion(BuildConfig.VERSION_NAME)
|
||||||
binding.mainTextSystemVersion.text =
|
binding.mainTextSystemVersion.text = LocaleString.systemVersion(systemVersion)
|
||||||
LocaleString.systemVersion("${Build.VERSION.RELEASE} (API ${Build.VERSION.SDK_INT}) ${Build.DISPLAY}")
|
|
||||||
binding.onlyShowErrorsInFrontSwitch.bind(ConfigData.ENABLE_ONLY_SHOW_ERRORS_IN_FRONT)
|
binding.onlyShowErrorsInFrontSwitch.bind(ConfigData.ENABLE_ONLY_SHOW_ERRORS_IN_FRONT)
|
||||||
binding.onlyShowErrorsInMainProcessSwitch.bind(ConfigData.ENABLE_ONLY_SHOW_ERRORS_IN_MAIN)
|
binding.onlyShowErrorsInMainProcessSwitch.bind(ConfigData.ENABLE_ONLY_SHOW_ERRORS_IN_MAIN)
|
||||||
binding.alwaysShowsReopenAppOptionsSwitch.bind(ConfigData.ENABLE_ALWAYS_SHOWS_REOPEN_APP_OPTIONS)
|
binding.alwaysShowsReopenAppOptionsSwitch.bind(ConfigData.ENABLE_ALWAYS_SHOWS_REOPEN_APP_OPTIONS)
|
||||||
@@ -63,6 +65,14 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
if (btn.isPressed.not()) return@setOnCheckedChangeListener
|
if (btn.isPressed.not()) return@setOnCheckedChangeListener
|
||||||
hideOrShowLauncherIcon(b)
|
hideOrShowLauncherIcon(b)
|
||||||
}
|
}
|
||||||
|
/** 系统版本点击事件 */
|
||||||
|
binding.mainTextSystemVersion.setOnClickListener {
|
||||||
|
showDialog {
|
||||||
|
title = LocaleString.notice
|
||||||
|
msg = systemVersion
|
||||||
|
confirmButton(LocaleString.gotIt)
|
||||||
|
}
|
||||||
|
}
|
||||||
/** 管理应用配置模板按钮点击事件 */
|
/** 管理应用配置模板按钮点击事件 */
|
||||||
binding.mgrAppsConfigsTemplateButton.setOnClickListener { whenActivated { navigate<ConfigureActivity>() } }
|
binding.mgrAppsConfigsTemplateButton.setOnClickListener { whenActivated { navigate<ConfigureActivity>() } }
|
||||||
/** 功能管理按钮点击事件 */
|
/** 功能管理按钮点击事件 */
|
||||||
|
Reference in New Issue
Block a user