Code example for Adapter

Methods: unregisterDataSetObserver

0
     * @see android.widget.AdapterView#setAdapter(android.widget.Adapter) 
     */ 
    @Override 
    public void setAdapter(T adapter) {
        if (mAdapter != null) {
            mAdapter.unregisterDataSetObserver(mObserver);
        } 
 
        mAdapter = adapter;
        mAdapter.registerDataSetObserver(mObserver);
 
        refreshView(); 
    } 
 
    /* 
     * (non-Javadoc) 
     *  
     * @see android.widget.AdapterView#getSelectedView() 
     */ 
    @Override 
    public View getSelectedView() {