public abstract class TypeAdapter extends BaseAdapter
| 限定符和类型 | 字段和说明 |
|---|---|
protected ViewUpdater |
updater
Updater for current view
|
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION| 构造器和说明 |
|---|
TypeAdapter() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected View[] |
getChildren(View parentView)
Get indexed children
|
protected <T> T |
getView(int childViewIndex,
Class<T> childViewClass)
Get child view
|
protected <T> T |
getView(View parentView,
int childViewIndex,
Class<T> childViewClass)
Get child view
|
protected ImageView |
imageView(int childViewIndex)
Get image view at given index
|
protected ImageView |
imageView(View parentView,
int childViewIndex)
Get image view at given index
|
protected View |
initialize(View view,
int[] children)
Initialize view by binding indexed child views to tags on the root view
Sub-classes may override this method but must call super
|
protected CompoundButton |
setChecked(int childViewIndex,
boolean checked)
Set the checked state of the
CompoundButton with at index |
protected CompoundButton |
setChecked(View parentView,
int childViewIndex,
boolean checked)
Set the checked state of the
CompoundButton with at index |
protected void |
setCurrentView(View view)
Set current view that is currently being updated
|
protected View |
setGone(int childViewIndex,
boolean gone)
Set child view as gone or visible
|
protected View |
setGone(View parentView,
int childViewIndex,
boolean gone)
Set child view as gone or visible
|
protected TextView |
setNumber(int childViewIndex,
long number)
Set text on text view to be formatted version of given integer number
This method uses the formatter returned from
NumberFormat.getIntegerInstance() |
protected TextView |
setNumber(View parentView,
int childViewIndex,
long number)
Set text on text view to be formatted version of given integer number
This method uses the formatter returned from
NumberFormat.getIntegerInstance() |
TextView |
setRelativeTimeSpan(int childViewIndex,
long time)
Set relative time span on text view
|
TextView |
setRelativeTimeSpan(View parentView,
int childViewIndex,
long time)
Set relative time span on text view
|
protected TextView |
setText(int childViewIndex,
CharSequence text)
Set text on text view at given index
|
protected TextView |
setText(int childViewIndex,
int resourceId)
Set text on text view at index to string resource
|
protected TextView |
setText(View parentView,
int childViewIndex,
CharSequence text)
Set text on text view at given index
|
protected TextView |
setText(View parentView,
int childViewIndex,
int resourceId)
Set text on text view at index to string resource
|
TextView |
setVisibleText(int childViewIndex,
CharSequence text)
Set the text on the text view if it is non-empty and make the view gone if
it is empty
|
TextView |
setVisibleText(View parentView,
int childViewIndex,
CharSequence text)
Set the text on the text view if it is non-empty and make the view gone if
it is empty
|
protected TextView |
textView(int childViewIndex)
Get text view at given index
|
protected TextView |
textView(View parentView,
int childViewIndex)
Get text view at given index
|
protected <V extends View> |
view(int childViewIndex)
Get view at given index
|
protected <V extends View> |
view(View parentView,
int childViewIndex)
Get view at given index
|
areAllItemsEnabled, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserverprotected final ViewUpdater updater
protected View initialize(View view, int[] children)
view - children - protected void setCurrentView(View view)
view - protected View[] getChildren(View parentView)
parentView - protected TextView textView(int childViewIndex)
childViewIndex - protected TextView textView(View parentView, int childViewIndex)
parentView - childViewIndex - protected ImageView imageView(int childViewIndex)
childViewIndex - protected ImageView imageView(View parentView, int childViewIndex)
parentView - childViewIndex - protected <V extends View> V view(int childViewIndex)
childViewIndex - protected <V extends View> V view(View parentView, int childViewIndex)
parentView - childViewIndex - protected TextView setText(int childViewIndex, CharSequence text)
childViewIndex - text - protected TextView setText(View parentView, int childViewIndex, CharSequence text)
parentView - childViewIndex - text - protected TextView setText(int childViewIndex, int resourceId)
childViewIndex - resourceId - protected TextView setText(View parentView, int childViewIndex, int resourceId)
parentView - childViewIndex - resourceId - protected TextView setNumber(int childViewIndex, long number)
NumberFormat.getIntegerInstance()childViewIndex - number - protected TextView setNumber(View parentView, int childViewIndex, long number)
NumberFormat.getIntegerInstance()parentView - childViewIndex - number - protected <T> T getView(int childViewIndex,
Class<T> childViewClass)
childViewIndex - childViewClass - protected <T> T getView(View parentView, int childViewIndex, Class<T> childViewClass)
parentView - childViewIndex - childViewClass - protected View setGone(int childViewIndex, boolean gone)
childViewIndex - gone - protected View setGone(View parentView, int childViewIndex, boolean gone)
parentView - childViewIndex - gone - protected CompoundButton setChecked(int childViewIndex, boolean checked)
CompoundButton with at indexchildViewIndex - checked - protected CompoundButton setChecked(View parentView, int childViewIndex, boolean checked)
CompoundButton with at indexparentView - childViewIndex - checked - public TextView setVisibleText(int childViewIndex, CharSequence text)
childViewIndex - text - public TextView setVisibleText(View parentView, int childViewIndex, CharSequence text)
parentView - childViewIndex - text - public TextView setRelativeTimeSpan(int childViewIndex, long time)
childViewIndex - time -