|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Observable
Observable classes provide a way in which data bound UI can be notified of changes.
ObservableList
and ObservableMap
also provide the ability to notify when
changes occur. ObservableField, ObservableParcelable, ObservableBoolean, ObservableByte,
ObservableShort, ObservableInt, ObservableLong, ObservableFloat, and ObservableDouble provide
a means by which properties may be notified without implementing Observable.
An Observable object should notify the Observable.OnPropertyChangedCallback
whenever
an observed property of the class changes.
The getter for an observable property should be annotated with Bindable
.
Convenience class BaseObservable implements this interface and PropertyChangeRegistry can help classes that don't extend BaseObservable to implement the listener registry.
Nested Class Summary | |
---|---|
static class |
Observable.OnPropertyChangedCallback
The callback that is called by Observable when an observable property has changed. |
Method Summary | |
---|---|
void |
addOnPropertyChangedCallback(Observable.OnPropertyChangedCallback callback)
Adds a callback to listen for changes to the Observable. |
void |
removeOnPropertyChangedCallback(Observable.OnPropertyChangedCallback callback)
Removes a callback from those listening for changes. |
Method Detail |
---|
void addOnPropertyChangedCallback(Observable.OnPropertyChangedCallback callback)
callback
- The callback to start listening.void removeOnPropertyChangedCallback(Observable.OnPropertyChangedCallback callback)
callback
- The callback that should stop listening.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |