public abstract class SingleTypeCursorAdapter extends CursorAdapter<RecyclerView.ViewHolder>
| 限定符和类型 | 字段和说明 |
|---|---|
protected Cursor |
cursor
Current cursor being binded to
|
FLAG_REGISTER_CONTENT_OBSERVER, mChangeObserver, mContext, mCursor, mCursorFilter, mDataSetObserver, mDataValid, mFilterQueryProvider, mRowIDColumn, updater| 构造器和说明 |
|---|
SingleTypeCursorAdapter(Activity activity,
Cursor cursor,
int flags,
int layoutResourceId)
Create adapter
|
SingleTypeCursorAdapter(Context context,
Cursor cursor,
int flags,
int layoutResourceId)
Create adapter
|
SingleTypeCursorAdapter(Context context,
Cursor cursor,
int flags,
LayoutInflater inflater,
int layoutResourceId)
Create adapter
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract int[] |
getChildViewIds()
Get child view ids to store
The index of each id in the returned array should be used when using the
helpers to update a specific child view
|
protected View |
initialize(View view)
Initialize view
|
void |
onBindViewHolder(RecyclerView.ViewHolder holder,
Cursor cursor)
Call when bind view with the cursor
|
RecyclerView.ViewHolder |
onCreateViewHolder(ViewGroup parent,
int viewType) |
protected TextView |
setNumber(int childViewIndex,
int columnIndex)
Set text on child view to number at column index
|
protected TextView |
setRelativeTimeSpan(int childViewIndex,
int columnIndex)
Set text on child view to time span from number at column index
|
protected TextView |
setText(int childViewIndex,
int columnIndex)
Set text on child view to string of column index
|
protected abstract void |
update(Cursor cursor)
Update item
|
changeCursor, convertToString, getCursor, getFilter, getFilterQueryProvider, getItemCount, getItemId, onBindViewHolder, onContentChanged, runQueryOnBackgroundThread, setFilterQueryProvider, swapCursorbindViewHolder, createViewHolder, getItemViewType, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onDetachedFromRecyclerView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserverprotected Cursor cursor
public SingleTypeCursorAdapter(Activity activity, Cursor cursor, int flags, int layoutResourceId)
activity - cursor - flags - layoutResourceId - public SingleTypeCursorAdapter(Context context, Cursor cursor, int flags, int layoutResourceId)
context - cursor - flags - layoutResourceId - public SingleTypeCursorAdapter(Context context, Cursor cursor, int flags, LayoutInflater inflater, int layoutResourceId)
context - cursor - flags - inflater - layoutResourceId - protected abstract int[] getChildViewIds()
protected abstract void update(Cursor cursor)
cursor - public void onBindViewHolder(RecyclerView.ViewHolder holder, Cursor cursor)
CursorAdapterpublic RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType)
protected TextView setText(int childViewIndex, int columnIndex)
childViewIndex - columnIndex - protected TextView setNumber(int childViewIndex, int columnIndex)
childViewIndex - columnIndex - protected TextView setRelativeTimeSpan(int childViewIndex, int columnIndex)
childViewIndex - columnIndex -