夜间模式
override fun onConfigurationChanged(newConfig: Configuration) { val nightModeFlags = getContext().resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK when (nightModeFlags) { Configuration.UI_MODE_NIGHT_YES -> { //TODO } Configuration.UI_MODE_NIGHT_NO -> { //TODO } Configuration.UI_MODE_NIGHT_UNDEFINED -> { } } super.onConfigurationChanged(newConfig) }