Created
May 21, 2022 16:54
-
-
Save trevorhackman/473f9e05d9ff6a96e642d0f05c842e1b to your computer and use it in GitHub Desktop.
Android View Binding Without Boilerplate - Part 2 - 1
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
private var _binding: ProfileBinding? = null | |
private val binding get() = _binding!! | |
override fun onCreateView( | |
inflater: LayoutInflater, | |
container: ViewGroup?, | |
savedInstanceState: Bundle? | |
): View { | |
_binding = ProfileBinding.inflate(inflater, container, false) | |
return binding.root | |
} | |
override fun onDestroyView() { | |
super.onDestroyView() | |
_binding = null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment