gradle_upgrade #149

Closed
davidoskky wants to merge 10 commits from davidoskky/ReaderForSelfoss-multiplatform:gradle_upgrade into master
Showing only changes of commit 990a354229 - Show all commits

View File

@ -71,23 +71,25 @@ class SettingsActivity : AppCompatActivity(),
}
override fun onPreferenceStartFragment(
caller: PreferenceFragmentCompat,
pref: Preference
caller: PreferenceFragmentCompat,
pref: Preference
): Boolean {
val fragmentClassName = pref.fragment ?: return false
// Instantiate the new Fragment
val args = pref.extras
val fragment = supportFragmentManager.fragmentFactory.instantiate(
classLoader,
pref.fragment
classLoader,
fragmentClassName
).apply {
arguments = args
setTargetFragment(caller, 0)
}
// Replace the existing Fragment with the new Fragment
supportFragmentManager.beginTransaction()
.replace(R.id.settings, fragment)
.addToBackStack(null)
.commit()
.replace(R.id.settings, fragment)
.addToBackStack(null)
.commit()
title = pref.title
supportActionBar?.title = title
return true