Created
April 2, 2024 14:55
-
-
Save IlyaGulya/f6527f98540362cc311a3bc82dcedc14 to your computer and use it in GitHub Desktop.
Lifecycle implementation that handles fragment hidden state changes
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 SomeFragment: Fragment() { | |
private val hiddenAwareLifecycle = HiddenAwareLifecycle(this) | |
override fun onHiddenChanged(hidden: Boolean) { | |
hiddenAwareLifecycle.onHiddenChanged(hidden) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment