Android Data Binding Library vs Kotlin Android Extensions

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 <data> 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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)