ObservableList
public
interface
ObservableList
implements
List<T>
android.databinding.ObservableList<T> |
Known Indirect Subclasses |
A List
that notifies when changes are made. An ObservableList bound to the UI
will keep the it up-to-date when changes occur.
The ObservableList must notify its callbacks whenever a change to the list occurs, using
ObservableList.OnListChangedCallback
.
ObservableArrayList implements ObservableList with an underlying ArrayList. ListChangeRegistry can help in maintaining the callbacks of other implementations.
See also:
Summary
Nested classes | |
---|---|
class |
ObservableList.OnListChangedCallback<T extends ObservableList>
The callback that is called by ObservableList when the list has changed. |
Public methods | |
---|---|
abstract
void
|
addOnListChangedCallback(OnListChangedCallback<? extends ObservableList<T>> callback)
Adds a callback to be notified when changes to the list occur. |
abstract
void
|
removeOnListChangedCallback(OnListChangedCallback<? extends ObservableList<T>> callback)
Removes a callback previously added. |
Inherited methods | |
---|---|
From
interface
java.util.List
| |
From
interface
java.util.Collection
| |
From
interface
java.lang.Iterable
|
Public methods
addOnListChangedCallback
void addOnListChangedCallback (OnListChangedCallback<? extends ObservableList<T>> callback)
Adds a callback to be notified when changes to the list occur.
Parameters | |
---|---|
callback |
OnListChangedCallback : The callback to be notified on list changes
|
removeOnListChangedCallback
void removeOnListChangedCallback (OnListChangedCallback<? extends ObservableList<T>> callback)
Removes a callback previously added.
Parameters | |
---|---|
callback |
OnListChangedCallback : The callback to remove.
|
Annotations
Interfaces
Classes
- BaseObservable
- CallbackRegistry
- CallbackRegistry.NotifierCallback
- DataBindingUtil
- ListChangeRegistry
- MapChangeRegistry
- MergedDataBinderMapper
- Observable.OnPropertyChangedCallback
- ObservableArrayList
- ObservableArrayMap
- ObservableBoolean
- ObservableByte
- ObservableChar
- ObservableDouble
- ObservableField
- ObservableFloat
- ObservableInt
- ObservableList.OnListChangedCallback
- ObservableLong
- ObservableMap.OnMapChangedCallback
- ObservableParcelable
- ObservableShort
- OnRebindCallback
- PropertyChangeRegistry
- ViewDataBinding
- ViewStubProxy
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-11 UTC.