Created
November 18, 2019 06:15
-
-
Save kirich1409/c4f2b831882686f5937b306d2b445f8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SetFragmentFactoryActivityCallback( | |
private val newFragmentFactory: FragmentFactory | |
) : EmptyActivityLifecycleCallbacks { | |
override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) { | |
if (activity is FragmentActivity) { | |
activity.supportFragmentManager.fragmentFactory = newFragmentFactory | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment