Created
August 19, 2021 09:01
-
-
Save thesiamak/0ffbcc8a04a5beffe6837ded7a40c195 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 MyFragment:Fragment(){ | |
val displayTimer = DisplayTimer(requireContext()) | |
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
super.onViewCreated(view, savedInstanceState) | |
// assign the observability to timer view. | |
viewLifecycleOwner.lifecycle.addObserver(displayTimer) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment