Skip to content

Instantly share code, notes, and snippets.

@kirich1409
Created May 3, 2020 10:06
Show Gist options
  • Save kirich1409/98d8573904905f2dc561fe561d0f2310 to your computer and use it in GitHub Desktop.
Save kirich1409/98d8573904905f2dc561fe561d0f2310 to your computer and use it in GitHub Desktop.
class ProfileFragment : Fragment(R.layout.profile) {
private var viewBinding: ProfileBinding? = null
override fun onViewCreated(view: View, savedState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
viewBinding = ProfileBinding.bind(view)
// Use viewBinding
}
override fun onDestroyView() {
super.onDestroyView()
viewBinding = null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment