Tag Archives: ActivityMainBinding

Event Handling using DataBinding in Android.

By | February 3, 2017

Using data binding, you can also handle events right from the layout xml using either Method references, or Listener bindings. For this we can create a seperate Class named “MyHandler”. Event Handler Class MyHandler.java Like my previous examples you have to initialize the listener in the Activity. Layout Now the layout that has a button… Read More »

DataBinding in Android using Observable Collections

By | January 30, 2017

As I shown in the previous post where we used BaseObservable and ObservableField to update UI when binding object is changed, this post will show you another simple way to achieve this. Do Check my previous posts for better understanding of DataBinding and methods used in DataBinding. http://www.coderzheaven.com/2017/01/15/simple-databinding-in-android-example/ http://www.coderzheaven.com/2017/01/20/data-binding-in-android-using-observables/ http://www.coderzheaven.com/2017/01/25/data-binding-in-android-using-observablefield-to-update-ui-automatically/ Here is another way to… Read More »

Data Binding in Android – Using Observables (BaseObservable) to Update UI automatically

By | January 20, 2017

In the last example, you may have got an idea of what DataBinding is. If not please check my tutorial here… Simple DataBinding in Android Example. Updating Objects using Observables. In the last tutorial you may have noticed, if you update the object which is data binded, the change is not reflected in the UI… Read More »

Simple DataBinding in Android Example.

By | January 15, 2017

This is a latest technique in Android where the UI is updated when the data bind to it changes, which is called databinding. DataBinding DataBinding has its own expression language for layout files. It corresponds to Java expressions and has quite impressive capabilities. Below you can see the list of all available operators: mathematical operators;… Read More »