Skip to content

Instantly share code, notes, and snippets.

@skleeschulte
skleeschulte / TwoWayBoundString.java
Last active February 26, 2016 03:33 — forked from Nilzor/TwoWayBoundString.java
Observable String for two-way data binding, based on Fabio Collini's article and Frode Nilsen's gist. This version works without an extra id in the resources and with all TextViews.
import android.databinding.BaseObservable;
import android.databinding.BindingAdapter;
import android.databinding.BindingConversion;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.TextView;
import java.io.Serializable;