Adapter registerDataSetObserver - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Adapter registerDataSetObserver method.

This code example shows how to use the following methods:registerDataSetObserver
                      ViewGroup parent) {
    return(delegate.getView(position, convertView, parent));
  } 
   
  public void registerDataSetObserver(DataSetObserver observer) {
    delegate.registerDataSetObserver(observer);
  } 
   
  public boolean hasStableIds() { 
    return(delegate.hasStableIds());
  } 
   
  public boolean isEmpty() { 
    return(delegate.isEmpty());
  } 
   
  public int getViewTypeCount() { 
    return(delegate.getViewTypeCount());
  } 
   
7
CodeRank
This code example shows how to use the following methods:registerDataSetObserver
		return wrapped.isEnabled(i);
	} 
 
	@Override 
	public void registerDataSetObserver(DataSetObserver dataSetObserver) {
		wrapped.registerDataSetObserver(dataSetObserver);
	} 
 
	@Override 
	public void unregisterDataSetObserver(DataSetObserver dataSetObserver) {
		wrapped.unregisterDataSetObserver(dataSetObserver);
	} 
 
	@Override 
	public int getCount() { 
		return wrapped.getCount();
	} 
 
	@Override 
	public Object getItem(int i) {
6
CodeRank
This code example shows how to use the following methods:registerDataSetObserver
        } 
    }; 
 
    public StickyGridHeadersListAdapterWrapper(ListAdapter adapter) {
        mDelegate = adapter;
        adapter.registerDataSetObserver(mDataSetObserver);
    } 
 
    @Override 
    public int getCount() { 
        return mDelegate.getCount();
    } 
 
    @Override 
    public Object getItem(int position) {
        return mDelegate.getItem(position);
    } 
 
    @Override 
    public long getItemId(int position) {
6
CodeRank
This code example shows how to use the following methods:getCount, registerDataSetObserver
                // adapter.  It is now time to show it. 
                setListShown(true, getView().getWindowToken() != null); 
            } 
        } 
        updateEmpty(); 
        mAdapter.registerDataSetObserver(new DataSetObserver() {
            @Override 
            public void onChanged() { 
                super.onChanged(); 
 
                updateEmpty(); 
            } 
 
            @Override 
            public void onInvalidated() { 
                super.onInvalidated(); 
 
                updateEmpty(); 
            } 
 

5
CodeRank
This code example shows how to use the following methods:registerDataSetObserver
        } else if (mAdapter != null) {
            mAdapter.unregisterDataSetObserver(mObserver);
        } 
        mAdapter = adapter;
        if (mAdapter != null) {
            adapter.registerDataSetObserver(mObserver);
        } 
 
        if (mDropDownList != null) {
            mDropDownList.setAdapter(mAdapter);
        } 
    } 
 
    public void setPromptPosition(int position) {
        mPromptPosition = position;
    } 
 
    public void setModal(boolean modal) {
        mModal = true;
        mPopup.setFocusable(modal);
6
CodeRank
This code example shows how to use the following methods:registerDataSetObserver
        } else if (mAdapter != null) {
            mAdapter.unregisterDataSetObserver(mObserver);
        } 
        mAdapter = adapter;
        if (mAdapter != null) {
            adapter.registerDataSetObserver(mObserver);
        } 
 
        if (mDropDownList != null) {
            mDropDownList.setAdapter(mAdapter);
        } 
    } 
 
    public void setPromptPosition(int position) {
        mPromptPosition = position;
    } 
 
    public void setModal(boolean modal) {
        mModal = true;
        mPopup.setFocusable(modal);
7
CodeRank
This code example shows how to use the following methods:registerDataSetObserver
	 * @param adapter 
	 *            Source for row views for this section 
	 */ 
	public void addAdapter(ListAdapter adapter) {
		pieces.add(adapter);
		adapter.registerDataSetObserver(new CascadeDataSetObserver());
	} 
 
	/** 
	 * Adds a new View to the roster of things to appear in the aggregate list. 
	 *  
	 * @param view 
	 *            Single view to add 
	 */ 
	public void addView(View view) {
		addView(view, false);
	} 
 
	/** 
	 * Adds a new View to the roster of things to appear in the aggregate list. 
6
CodeRank
This code example shows how to use the following methods:registerDataSetObserver
This code example shows how to use the following methods:registerDataSetObserver
	 * Adds a new adapter to the roster of things to appear in the aggregate list. 
	 * @param adapter Source for row views for this section 
	 */ 
	public void addAdapter(ListAdapter adapter) {
		pieces.add(adapter);
		adapter.registerDataSetObserver(new CascadeDataSetObserver());
	} 
 
	/** 
	 * Get the data item associated with the specified position in the data set. 
	 * @param position Position of the item whose data we want 
	 */ 
	public Object getItem(int position) {
		for (ListAdapter piece : pieces) {
			int size = piece.getCount();
 
			if (position < size) {
				return (piece.getItem(position));
			} 
 
5
CodeRank
This code example shows how to use the following methods:registerDataSetObserver
        headers = new ArrayAdapter<String>(context, layoutId);
    } 
 
    public void addSection(String section, Adapter adapter) {
        this.headers.add(section);
        this.sections.put(section, adapter);
         
        // Register an observer so we can call notifyDataSetChanged() when our 
        // children adapters are modified, otherwise no change will be visible. 
        adapter.registerDataSetObserver(mDataSetObserver);
    } 
     
    public void removeObserver() { 
        // Notify all our children that they should release their observers too. 
        for (Map.Entry<String, Adapter> it : sections.entrySet()) {
            if (it.getValue() instanceof ObservableAdapter) {
                ObservableAdapter adapter = (ObservableAdapter)it.getValue();
                adapter.removeObserver();
            } 
        } 
5
CodeRank

Related Adapter registerDataSetObserver Questions & Answers:

registerDataSetObserver Method Overview
Register an observer that is called when changes happen to the data used by this adapter.
See Code Examples for other Android Adapter Methods: