Android DataBinding Tutorial (JAVA) | Android DataBinding Step By Step for beginners

preview_player
Показать описание
The Data Binding Library is a support library that allows you to bind UI components in your layouts to data sources in your app using a declarative format rather than programmatically. Layouts are often defined in activities with code that calls UI framework methods.
It's a part of Android JetPack Components.
As we use declarative Format instead of writing code for data binding, it reduces boilerplate code.

Uses of DataBinding:
- You need not call findViewByID() anymore
- Data Binding encourages the separation of UI logic with Business Logic.
- Synchronization of UI With Data is easy.
- Works pretty well with ViewModel and LiveData

Starter app Code :

Solution Code:

______________________
Social Media Links
______________________
Follow Me on Social Media :

Рекомендации по теме
Комментарии
Автор

please do a mvvm video series like login register or crud with firebase or retrofit

ashrafmakandar
Автор

If I am NOT using am XML for the view, instead coded it myself in a Java class, how can I bind the view with setContentView function?!

pickemparty
Автор

Bro, i have MainActivity with 3 fragments in it. I already use data binding but when i change fragment tab . The data resets? Any idea to fix this ?
~Please help ;(

godzabomni