public class ViewUpdater extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
View[] |
childViews
Child views currently being updated
|
static NumberFormat |
FORMAT_INT
Number formatter for integers
|
View |
view
Root view currently being updated
|
| 构造器和说明 |
|---|
ViewUpdater() |
| 限定符和类型 | 方法和说明 |
|---|---|
View[] |
getChildren(View parentView)
Get indexed children
|
<T> T |
getView(int childViewIndex,
Class<T> childViewClass)
Get child view
|
<T> T |
getView(View parentView,
int childViewIndex,
Class<T> childViewClass)
Get child view
|
ImageView |
imageView(int childViewIndex)
Get image view at given index
|
ImageView |
imageView(View parentView,
int childViewIndex)
Get image view at given index
|
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
|
CompoundButton |
setChecked(int childViewIndex,
boolean checked)
Set the checked state of the
CompoundButton with at index |
CompoundButton |
setChecked(View parentView,
int childViewIndex,
boolean checked)
Set the checked state of the
CompoundButton with at index |
void |
setCurrentView(View view)
Set current view that is currently being updated
|
View |
setGone(int childViewIndex,
boolean gone)
Set child view as gone or visible
|
View |
setGone(View parentView,
int childViewIndex,
boolean gone)
Set child view as gone or visible
|
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() |
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
|
TextView |
setText(int childViewIndex,
CharSequence text)
Set text on text view at given index
|
TextView |
setText(int childViewIndex,
int resourceId)
Set text on text view at index to string resource
|
TextView |
setText(View parentView,
int childViewIndex,
CharSequence text)
Set text on text view at given index
|
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
|
TextView |
textView(int childViewIndex)
Get text view at given index
|
TextView |
textView(View parentView,
int childViewIndex)
Get text view at given index
|
<V extends View> |
view(int childViewIndex)
Get view at given index
|
<V extends View> |
view(View parentView,
int childViewIndex)
Get view at given index
|
public static final NumberFormat FORMAT_INT
public View view
public View[] childViews
public View initialize(View view, int[] children)
view - children - public void setCurrentView(View view)
view - public View[] getChildren(View parentView)
parentView - public TextView textView(int childViewIndex)
childViewIndex - public TextView textView(View parentView, int childViewIndex)
parentView - childViewIndex - public ImageView imageView(int childViewIndex)
childViewIndex - public ImageView imageView(View parentView, int childViewIndex)
parentView - childViewIndex - public <V extends View> V view(int childViewIndex)
childViewIndex - public <V extends View> V view(View parentView, int childViewIndex)
parentView - childViewIndex - public TextView setText(int childViewIndex, CharSequence text)
childViewIndex - text - public TextView setText(View parentView, int childViewIndex, CharSequence text)
parentView - childViewIndex - text - public TextView setText(int childViewIndex, int resourceId)
childViewIndex - resourceId - public TextView setText(View parentView, int childViewIndex, int resourceId)
parentView - childViewIndex - resourceId - public TextView setNumber(int childViewIndex, long number)
NumberFormat.getIntegerInstance()childViewIndex - number - public TextView setNumber(View parentView, int childViewIndex, long number)
NumberFormat.getIntegerInstance()parentView - childViewIndex - number - public <T> T getView(int childViewIndex,
Class<T> childViewClass)
childViewIndex - childViewClass - public <T> T getView(View parentView, int childViewIndex, Class<T> childViewClass)
parentView - childViewIndex - childViewClass - public View setGone(int childViewIndex, boolean gone)
childViewIndex - gone - public View setGone(View parentView, int childViewIndex, boolean gone)
parentView - childViewIndex - gone - public CompoundButton setChecked(int childViewIndex, boolean checked)
CompoundButton with at indexchildViewIndex - checked - public 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 -