Android data-binding (similar to WPF)?

Native Data Binding

Google has launched its native Data Binding Library!

https://developer.android.com/tools/data-binding/guide.html

Which lets you write your views as such

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@{user.firstName}"/>

But its event wiring mechanism at this time (rc1 version) can’t bind to methods on a class extending from Observable (an exception is thrown when compiling; this is a known bug which will be solved).

And sure the lack of two-way binding (which is not expected to be on the first release) is a big drawback.

Anyway, here’s a good sample project to play around with https://github.com/saleeh93/data-binding-samples

Leave a Comment

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