Code example for ListAdapter

Methods: registerDataSetObserver

0
	public void setAdapter(ListAdapter adapter) {
		if(mAdapter != null) {
			mAdapter.unregisterDataSetObserver(mDataObserver);
		} 
		mAdapter = adapter;
		mAdapter.registerDataSetObserver(mDataObserver);
		reset(); 
	} 
	 
	private synchronized void reset(){ 
		initView(); 
		removeAllViewsInLayout();
        requestLayout();
	} 
 
	@Override 
	public void setSelection(int position) {
		//TODO: implement 
	} 
	 
	private void addAndMeasureChild(final View child, int viewPos) {