|
|
@ -18,18 +18,14 @@ class ThemeFragment : PreferenceFragmentCompat() {
|
|
|
|
private lateinit var radioAutoBatteryTheme: RadioButtonPreference
|
|
|
|
private lateinit var radioAutoBatteryTheme: RadioButtonPreference
|
|
|
|
private lateinit var radioFollowDeviceTheme: RadioButtonPreference
|
|
|
|
private lateinit var radioFollowDeviceTheme: RadioButtonPreference
|
|
|
|
|
|
|
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
|
|
|
|
|
super.onCreate(savedInstanceState)
|
|
|
|
|
|
|
|
(activity as AppCompatActivity).title = getString(R.string.preferences_theme)
|
|
|
|
|
|
|
|
(activity as AppCompatActivity).supportActionBar?.show()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
|
|
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
|
|
|
setPreferencesFromResource(R.xml.theme_preferences, rootKey)
|
|
|
|
setPreferencesFromResource(R.xml.theme_preferences, rootKey)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
override fun onResume() {
|
|
|
|
override fun onResume() {
|
|
|
|
super.onResume()
|
|
|
|
super.onResume()
|
|
|
|
|
|
|
|
(activity as AppCompatActivity).title = getString(R.string.preferences_theme)
|
|
|
|
|
|
|
|
(activity as AppCompatActivity).supportActionBar?.show()
|
|
|
|
setupPreferences()
|
|
|
|
setupPreferences()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|