Build 1.0_r1(from source)

android.widget
Class ResourceCursorAdapter

java.lang.Object
  extended by android.widget.BaseAdapter
      extended by android.widget.CursorAdapter
          extended by android.widget.ResourceCursorAdapter
All Implemented Interfaces:
Adapter, CursorFilter.CursorFilterClient, Filterable, ListAdapter, SpinnerAdapter
Direct Known Subclasses:
SimpleCursorAdapter

public abstract class ResourceCursorAdapter
extends CursorAdapter

An easy adapter that creates views defined in an XML file. You can specify the XML file that defines the appearance of the views.


Field Summary
 
Fields inherited from class android.widget.CursorAdapter
mAutoRequery, mChangeObserver, mContext, mCursor, mCursorFilter, mDataSetObserver, mDataValid, mFilterQueryProvider, mRowIDColumn
 
Fields inherited from interface android.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
 
Constructor Summary
ResourceCursorAdapter(Context context, int layout, Cursor c)
          Constructor.
 
Method Summary
 View newDropDownView(Context context, Cursor cursor, ViewGroup parent)
          Makes a new drop down view to hold the data pointed to by cursor.
 View newView(Context context, Cursor cursor, ViewGroup parent)
          Inflates view(s) from the specified XML file.
 void setDropDownViewResource(int dropDownLayout)
          Sets the layout resource of the drop down views.
 
Methods inherited from class android.widget.CursorAdapter
bindView, changeCursor, convertToString, getCount, getCursor, getDropDownView, getFilter, getFilterQueryProvider, getItem, getItemId, getView, hasStableIds, init, runQueryOnBackgroundThread, setFilterQueryProvider
 
Methods inherited from class android.widget.BaseAdapter
areAllItemsEnabled, getItemViewType, getViewTypeCount, isEmpty, isEnabled, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceCursorAdapter

public ResourceCursorAdapter(Context context,
                             int layout,
                             Cursor c)
Constructor.

Parameters:
context - The context where the ListView associated with this SimpleListItemFactory is running
layout - resource identifier of a layout file that defines the views for this list item.
Method Detail

newView

public View newView(Context context,
                    Cursor cursor,
                    ViewGroup parent)
Inflates view(s) from the specified XML file.

Specified by:
newView in class CursorAdapter
Parameters:
context - Interface to application's global information
cursor - The cursor from which to get the data. The cursor is already moved to the correct position.
parent - The parent to which the new view is attached to
Returns:
the newly created view.
See Also:
CursorAdapter.newView(android.content.Context, android.database.Cursor, ViewGroup)

newDropDownView

public View newDropDownView(Context context,
                            Cursor cursor,
                            ViewGroup parent)
Description copied from class: CursorAdapter
Makes a new drop down view to hold the data pointed to by cursor.

Overrides:
newDropDownView in class CursorAdapter
Parameters:
context - Interface to application's global information
cursor - The cursor from which to get the data. The cursor is already moved to the correct position.
parent - The parent to which the new view is attached to
Returns:
the newly created view.

setDropDownViewResource

public void setDropDownViewResource(int dropDownLayout)

Sets the layout resource of the drop down views.

Parameters:
dropDownLayout - the layout resources used to create drop down views

Build 1.0_r1(from source)

Please submit a feedback, bug or feature