android.widget
Class CursorAdapter

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

public abstract class CursorAdapter
extends BaseAdapter
implements Filterable


Field Summary
static int FLAG_AUTO_REQUERY
           
static int FLAG_REGISTER_CONTENT_OBSERVER
           
 
Fields inherited from interface android.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
 
Constructor Summary
CursorAdapter(Context context, Cursor c)
           
CursorAdapter(Context context, Cursor c, boolean autoRequery)
           
CursorAdapter(Context context, Cursor c, int flags)
           
 
Method Summary
abstract  void bindView(View view, Context context, Cursor cursor)
           
 void changeCursor(Cursor cursor)
           
 CharSequence convertToString(Cursor cursor)
           
 int getCount()
           
 Cursor getCursor()
           
 View getDropDownView(int position, View convertView, ViewGroup parent)
           
 Filter getFilter()
           
 FilterQueryProvider getFilterQueryProvider()
           
 Object getItem(int position)
           
 long getItemId(int position)
           
 View getView(int position, View convertView, ViewGroup parent)
           
 boolean hasStableIds()
           
protected  void init(Context context, Cursor c, boolean autoRequery)
           
 View newDropDownView(Context context, Cursor cursor, ViewGroup parent)
           
abstract  View newView(Context context, Cursor cursor, ViewGroup parent)
           
protected  void onContentChanged()
           
 Cursor runQueryOnBackgroundThread(CharSequence constraint)
           
 void setFilterQueryProvider(FilterQueryProvider filterQueryProvider)
           
 Cursor swapCursor(Cursor newCursor)
           
 
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
 

Field Detail

FLAG_AUTO_REQUERY

public static final int FLAG_AUTO_REQUERY
See Also:
Constant Field Values

FLAG_REGISTER_CONTENT_OBSERVER

public static final int FLAG_REGISTER_CONTENT_OBSERVER
See Also:
Constant Field Values
Constructor Detail

CursorAdapter

public CursorAdapter(Context context,
                     Cursor c)

CursorAdapter

public CursorAdapter(Context context,
                     Cursor c,
                     boolean autoRequery)

CursorAdapter

public CursorAdapter(Context context,
                     Cursor c,
                     int flags)
Method Detail

init

protected void init(Context context,
                    Cursor c,
                    boolean autoRequery)

getCursor

public Cursor getCursor()

getCount

public int getCount()
Specified by:
getCount in interface Adapter

getItem

public Object getItem(int position)
Specified by:
getItem in interface Adapter

getItemId

public long getItemId(int position)
Specified by:
getItemId in interface Adapter

hasStableIds

public boolean hasStableIds()
Specified by:
hasStableIds in interface Adapter
Overrides:
hasStableIds in class BaseAdapter

getView

public View getView(int position,
                    View convertView,
                    ViewGroup parent)
Specified by:
getView in interface Adapter

getDropDownView

public View getDropDownView(int position,
                            View convertView,
                            ViewGroup parent)
Specified by:
getDropDownView in interface SpinnerAdapter
Overrides:
getDropDownView in class BaseAdapter

newView

public abstract View newView(Context context,
                             Cursor cursor,
                             ViewGroup parent)

newDropDownView

public View newDropDownView(Context context,
                            Cursor cursor,
                            ViewGroup parent)

bindView

public abstract void bindView(View view,
                              Context context,
                              Cursor cursor)

changeCursor

public void changeCursor(Cursor cursor)

swapCursor

public Cursor swapCursor(Cursor newCursor)

convertToString

public CharSequence convertToString(Cursor cursor)

runQueryOnBackgroundThread

public Cursor runQueryOnBackgroundThread(CharSequence constraint)

getFilter

public Filter getFilter()
Specified by:
getFilter in interface Filterable

getFilterQueryProvider

public FilterQueryProvider getFilterQueryProvider()

setFilterQueryProvider

public void setFilterQueryProvider(FilterQueryProvider filterQueryProvider)

onContentChanged

protected void onContentChanged()


Copyright © 2008-2012. All Rights Reserved.