AB 支持绑定 Collection
public class ArrayListObservable<T> extends ObservableCollection<T> implements Collection<T>
示例:
The constructor is pretty much similar to simple observable properties, notice you must pass the class of the generic type to it (just like observables). public ArrayListObservable<String> NameOfList = new ArrayListObservable<String>(String.class); With above declaration, you can do something like: NameOfList.setArray(new String[] { ... }); NameOfList.add("abc"); //etc just like normal ArrayList, and if you bind it to itemSource of ListViews or Spinners, the change on the list will be reflected to the view directly.