Tito_Lortex
Lurker
I've updated my build.gradle (Module: app) with a newer implementation of 'kotlin-kapt' and implemented the navigation plugin.
Android Studio has now highlighted these lines as errors inside the onCreateView function of my Fragments:
private lateinit var binding: FragmentPrincipalBinding
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
binding = DataBindingUtil.inflate(inflater, R.layout.fragment_principal, container, false)
[...]
-> binding.setLifecycleOwner(this) <-
[...]
-> return binding.root() <-
}
The methods are now not avaiable for the binding object so, how do I do the Lifecycle owning of the binding for the Fragment? And what do I return now?
Android Studio has now highlighted these lines as errors inside the onCreateView function of my Fragments:
private lateinit var binding: FragmentPrincipalBinding
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
binding = DataBindingUtil.inflate(inflater, R.layout.fragment_principal, container, false)
[...]
-> binding.setLifecycleOwner(this) <-
[...]
-> return binding.root() <-
}
The methods are now not avaiable for the binding object so, how do I do the Lifecycle owning of the binding for the Fragment? And what do I return now?