I\'m reading about how the MVVM architecture works and how to use Android Data Binding Library help.
In a very general way I understand that Android Data Binding creates
Both, Kotlin Android Extensions and Android Data Binding Library help to eliminate the use of findViewById
.
But there are also more things that these do, that can complement one another.
To elaborate, with the Android Data Binding library, you can 'set' models in your xml files, which can then directly be leveraged to set values for the views in the layout. See how a tag can be used with the data binding library.
Kotlin android extensions does not provide for this.
At the same time, Kotlin android extensions provides for some amazing features like @parcelize
annotation to make classes parcelable with almost no boilerplate code, etc.
To conclude, while they both eliminate the use of findViewById
, they have their own features too which can complement one another well.