2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/15725: Set up preferences in onCreatePreferences instead of onResume

set up preferences in onCreatePreferences instead of onResume so that their visibility is determined before the screen appears rather than after
This commit is contained in:
Jocelyne Abi Haidar 2020-11-02 17:20:23 +02:00 committed by Arturo Mejia
parent 6b4fbca1bb
commit 4f82163e36

View File

@ -34,12 +34,13 @@ class CustomizationFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(R.xml.customization_preferences, rootKey) setPreferencesFromResource(R.xml.customization_preferences, rootKey)
setupPreferences()
} }
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
showToolbar(getString(R.string.preferences_customize)) showToolbar(getString(R.string.preferences_customize))
setupPreferences()
} }
private fun setupPreferences() { private fun setupPreferences() {