public abstract class

ContactEntryAdapter

extends BaseAdapter
java.lang.Object
   ↳ android.widget.BaseAdapter
     ↳ com.android.contacts.ContactEntryAdapter<E extends com.android.contacts.ContactEntryAdapter.Entry>

Summary

Nested Classes
class ContactEntryAdapter.Entry Base class for adapter entries. 
[Expand]
Inherited Constants
From interface android.widget.Adapter
Fields
protected Context mContext
protected LayoutInflater mInflater
protected ArrayList<ArrayList<E extends ContactEntryAdapter.Entry>> mSections
protected boolean mSeparators
Public Methods
final boolean areAllItemsEnabled()
static <T extends ContactEntryAdapter.Entry> int countEntries(ArrayList<ArrayList<T>> sections, boolean separators)
Get the count of entries in all sections
final int getCount()
final static <T extends ContactEntryAdapter.Entry> T getEntry(ArrayList<ArrayList<T>> sections, int position, boolean separators)
Get the entry for the given position.
final Object getItem(int position)
final long getItemId(int position)
View getView(int position, View convertView, ViewGroup parent)
final boolean isEnabled(int position)
final int setSections(ArrayList<ArrayList<E>> sections, E entry)
Resets the section data and returns the position of the given entry.
final void setSections(ArrayList<ArrayList<E>> sections, boolean separators)
Resets the section data.
Protected Methods
abstract void bindView(View view, E entry)
Binds the data from an entry to a view.
abstract View newView(int position, ViewGroup parent)
Create a new view for an entry.
[Expand]
Inherited Methods
From class android.widget.BaseAdapter
From class java.lang.Object
From interface android.widget.Adapter
From interface android.widget.ListAdapter
From interface android.widget.SpinnerAdapter

Fields

protected Context mContext

protected LayoutInflater mInflater

protected ArrayList<ArrayList<E extends ContactEntryAdapter.Entry>> mSections

protected boolean mSeparators

Public Methods

public final boolean areAllItemsEnabled ()

See Also
  • android.widget.ListAdapter#hasSeparators()

public static int countEntries (ArrayList<ArrayList<T>> sections, boolean separators)

Get the count of entries in all sections

Parameters
sections the list of sections
Returns
  • the count of entries in all sections

public final int getCount ()

See Also

public static final T getEntry (ArrayList<ArrayList<T>> sections, int position, boolean separators)

Get the entry for the given position.

Parameters
sections the list of sections
position the position for the desired entry
Returns
  • the ContactEntry for the given position

public final Object getItem (int position)

See Also

public final long getItemId (int position)

See Also

public View getView (int position, View convertView, ViewGroup parent)

public final boolean isEnabled (int position)

See Also
  • android.widget.ListAdapter#isSeparator(int)

public final int setSections (ArrayList<ArrayList<E>> sections, E entry)

Resets the section data and returns the position of the given entry.

Parameters
sections the section data
entry the entry to return the position for
Returns
  • the position of entry, or -1 if it isn't found

public final void setSections (ArrayList<ArrayList<E>> sections, boolean separators)

Resets the section data.

Parameters
sections the section data

Protected Methods

protected abstract void bindView (View view, E entry)

Binds the data from an entry to a view.

Parameters
view the view to display the entry in
entry the data to bind

protected abstract View newView (int position, ViewGroup parent)

Create a new view for an entry.

Returns
  • the newly created view