Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
No issues: Set ThemeFragment title in onResume (#2801)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekager authored and boek committed May 24, 2019
1 parent a800535 commit c6ac791
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/src/main/java/org/mozilla/fenix/settings/ThemeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,14 @@ class ThemeFragment : PreferenceFragmentCompat() {
private lateinit var radioAutoBatteryTheme: 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?) {
setPreferencesFromResource(R.xml.theme_preferences, rootKey)
}

override fun onResume() {
super.onResume()
(activity as AppCompatActivity).title = getString(R.string.preferences_theme)
(activity as AppCompatActivity).supportActionBar?.show()
setupPreferences()
}

Expand Down

0 comments on commit c6ac791

Please sign in to comment.