Skip to content

Instantly share code, notes, and snippets.

@mlegy
Created October 30, 2020 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlegy/2e170bddf7de1e84a63fa861fca3f32b to your computer and use it in GitHub Desktop.
Save mlegy/2e170bddf7de1e84a63fa861fca3f32b to your computer and use it in GitHub Desktop.
private var _binding: FragmentMainBinding? = null
private val binding get() = _binding!!
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
_binding = FragmentMainBinding.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