Code example for ListAdapter

Methods: registerDataSetObserver

0
     * 
     * @param adapter Source for row views for this section 
     */ 
    public void addAdapter(ListAdapter adapter) {
        pieces.add(adapter);
        adapter.registerDataSetObserver(observer);
    } 
 
    public void removeAdapter(ListAdapter adapter) {
        adapter.unregisterDataSetObserver(observer);
        pieces.remove(adapter);
    } 
 
    /** 
    * Adds a new View to the roster of things to appear 
    * in the aggregate list. 
    * 
    * @param view Single view to add 
    */ 
    public ListAdapter addView(View view) {
        return addView(view, false);