Code example for Adapter

Methods: unregisterDataSetObserver

0
     
     
    public void setAdapter(Adapter adapter)
    { 
        if (this.mAdapter != null)
            this.mAdapter.unregisterDataSetObserver(mObserver);
 
        this.mAdapter = adapter;
        adapter.registerDataSetObserver(mObserver);
//        mObserver.onChanged(); 
    } 
 
    private class Observer extends DataSetObserver
    { 
    	LinearLayoutAdaptable linearLayoutAdaptable;
 
        public Observer(LinearLayoutAdaptable linearLayout)
        { 
            this.linearLayoutAdaptable = linearLayout;
        } 
Experience pair programming with AI  Get Codota for Java