-
Notifications
You must be signed in to change notification settings - Fork 4
Propoid ui
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.
Converters allow conversion for a TextBinding:
new TextBinding(foo.intProperty, editText, new NumberConverter(R.string.NO_NUMBER));Conversion errors are automatically reported on the view.
Boolean properties can be bound to CheckBox views view CheckBinding:
new CheckBinding(foo.booleanProperty, checkBox);Properties can be bound to a spinner via SpinnerBinding:
new SpinnerBinding(foo.property, spinner, "A", "B", "C"); SpinnerBinding.string(foo.property, spinner, "A", "B", "C");