Data Binding -- Write Apps Faster (Android Dev Summit 2015)

Android Developers · 75K views · 2015 · 34:12

Open on YouTube

Software architecture & designWeb developmenttalkdated

Why Stack Overflow recommends it

Stack Overflow users link it when explaining why data binding is useful, how it cuts findViewById and setText boilerplate, and how the generated binding code works.

Recommended by 2 people across 2 different months, 2015 to 2017.

What it is

A conference talk from Android Dev Summit 2015 in which George Mount and Yigit Boyar introduce Android Data Binding, the library that ties data models to layout XML through binding expressions. They also explain some of the code generation that happens behind the scenes.

What people said

Recommends CommonsWare · 2016-12 · Stack Overflow · on “why use Databinding?”

"do i have or need to change all my code to Databinding Syntax" -- only where you want to use data binding. "is it necessary" -- no. "will it make my application more secure" -- no. "i have read somewhere that it will minimize the code and i dont have to write findviewbyid for every view or settext in most of the cases" -- correct. I recommend watching this video [this video] and this video [LINK] to learn why data binding may be useful to you.

Recommends BhalchandraSW · 2017-06 · Stack Overflow · on “Multiplication from 2 field, too many variable”

As MacLean Sochor [LINK] commented you cannot reduce the code because those are the exact steps you have to perform. Anyways, you can use following steps to reduce a code little bit and therefore, make it readable . One suggestion I always follow is to assign listeners in XML layout: <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/multiply" // multiply is '*' in strings.xml android:onClick="multiply" /> // Here you are assigning click listener Assigning a suitable name to click listener makes it readable . Provided that, some may argue that the method does not accept the arguments required to perform the task its name suggests. protected

Cites Sushant · 2015-12 · Stack Overflow · on “Debug android data binding?”

Can anyone please tell me how can I debug or find the generated code from data binding. From this [this video] link I found out it generates the required code.