Skip to content
svenmeier edited this page Jan 18, 2012 · 9 revisions

With propoid-ui you can bind a property to a view with a single line of code:

    TextBinding.string(foo.stringProperty, editText);

All changes to the property are automatically propagated to the view and vice versa.

Text

Converters allow conversion between arbitrary types and text views:

    new TextBinding(foo.intProperty, editText, new NumberConverter(R.string.NO_NUMBER));

Conversion errors are automatically reported on the view.

CheckBox

Boolean properties can be bound to CheckBox views:

    new CheckBinding(foo.booleanProperty, checkBox);

Spinner

Boolean properties can be bound to CheckBox views:

    SpinnerBinding.string(foo.property, spinner, "A", "B", "C");

Clone this wiki locally