Android
android.widget
public class

android.widget.HeaderViewListAdapter

java.lang.Object
android.widget.HeaderViewListAdapter Filterable WrapperListAdapter

ListAdapter used when a ListView has header views. This ListAdapter wraps another one and also keeps track of the header views and their associated data objects.

This is intended as a base class; you will probably not need to use this class directly in your own code.

Summary

Constants inherited from interface android.widget.Adapter

Public Constructors

            HeaderViewListAdapter(ArrayList<ListView.FixedViewInfo> headerViewInfos, ArrayList<ListView.FixedViewInfo> footerViewInfos, ListAdapter adapter)

Public Methods

          boolean  areAllItemsEnabled()
Are all items in this ListAdapter enabled? If yes it means all items are selectable and clickable.
          int  getCount()
How many items are in the data set represented by this Adapter.
          Filter  getFilter()

Returns a filter that can be used to constrain data with a filtering pattern.

          int  getFootersCount()
          int  getHeadersCount()
          Object  getItem(int position)
Get the data item associated with the specified position in the data set.
          long  getItemId(int position)
Get the row id associated with the specified position in the list.
          int  getItemViewType(int position)
Get the type of View that will be created by getView(int, View, ViewGroup) for the specified item.
          View  getView(int position, View convertView, ViewGroup parent)
Get a View that displays the data at the specified position in the data set.
          int  getViewTypeCount()

Returns the number of types of Views that will be created by getView(int, View, ViewGroup).

          ListAdapter  getWrappedAdapter()
Returns the adapter wrapped by this list adapter.
          boolean  hasStableIds()
Indicated whether the item ids are stable across changes to the underlying data.
          boolean  isEmpty()
          boolean  isEnabled(int position)
Returns true if the item at the specified position is not a separator.
          void  registerDataSetObserver(DataSetObserver observer)
Register an observer that is called when changes happen to the data used by this adapter.
          boolean  removeFooter(View v)
          boolean  removeHeader(View v)
          void  unregisterDataSetObserver(DataSetObserver observer)
Unregister an observer that has previously been registered with this adapter via registerDataSetObserver(DataSetObserver).
Methods inherited from class java.lang.Object
Methods inherited from interface android.widget.Adapter
Methods inherited from interface android.widget.Filterable
Methods inherited from interface android.widget.ListAdapter
Methods inherited from interface android.widget.WrapperListAdapter

Details

Public Constructors

public HeaderViewListAdapter(ArrayList<ListView.FixedViewInfo> headerViewInfos, ArrayList<ListView.FixedViewInfo> footerViewInfos, ListAdapter adapter)

Public Methods

public boolean areAllItemsEnabled()

Are all items in this ListAdapter enabled? If yes it means all items are selectable and clickable.

public int getCount()

How many items are in the data set represented by this Adapter.

public Filter getFilter()

Returns a filter that can be used to constrain data with a filtering pattern.

This method is usually implemented by Adapter classes.

public int getFootersCount()

public int getHeadersCount()

public Object getItem(int position)

Get the data item associated with the specified position in the data set.

public long getItemId(int position)

Get the row id associated with the specified position in the list.

public int getItemViewType(int position)

Get the type of View that will be created by getView(int, View, ViewGroup) for the specified item.

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

Get a View that displays the data at the specified position in the data set. You can either create a View manually or inflate it from an XML layout file. When the View is inflated, the parent View (GridView, ListView...) will apply default layout parameters unless you use inflate(int, android.view.ViewGroup, boolean) to specify a root view and to prevent attachment to the root.

public int getViewTypeCount()

Returns the number of types of Views that will be created by getView(int, View, ViewGroup). Each type represents a set of views that can be converted in getView(int, View, ViewGroup). If the adapter always returns the same type of View for all items, this method should return 1.

This method will only be called when when the adapter is set on the the AdapterView.

public ListAdapter getWrappedAdapter()

Returns the adapter wrapped by this list adapter.

public boolean hasStableIds()

Indicated whether the item ids are stable across changes to the underlying data.

public boolean isEmpty()

public boolean isEnabled(int position)

Returns true if the item at the specified position is not a separator. (A separator is a non-selectable, non-clickable item).

public void registerDataSetObserver(DataSetObserver observer)

Register an observer that is called when changes happen to the data used by this adapter.

public boolean removeFooter(View v)

public boolean removeHeader(View v)

public void unregisterDataSetObserver(DataSetObserver observer)

Unregister an observer that has previously been registered with this adapter via registerDataSetObserver(DataSetObserver).
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48