public static class RowPresenter.ViewHolder extends Presenter.ViewHolder
Row
.Modifier and Type | Field and Description |
---|---|
protected ColorOverlayDimmer |
mColorDimmer |
view
Constructor and Description |
---|
ViewHolder(View view)
Constructor for ViewHolder.
|
Modifier and Type | Method and Description |
---|---|
RowHeaderPresenter.ViewHolder |
getHeaderViewHolder()
Returns the view holder for the Row header for this Row.
|
BaseOnItemViewClickedListener |
getOnItemViewClickedListener()
Returns the listener for item click event.
|
BaseOnItemViewSelectedListener |
getOnItemViewSelectedListener()
Returns the listener for item or row selection.
|
View.OnKeyListener |
getOnKeyListener()
Returns the key listener.
|
Row |
getRow()
Returns the row bound to this ViewHolder.
|
Object |
getRowObject()
Returns the Row object bound to this ViewHolder.
|
float |
getSelectLevel()
Returns the current selection level of the Row.
|
boolean |
isExpanded()
Returns whether the Row is in its expanded state.
|
boolean |
isSelected()
Returns whether the Row is selected.
|
void |
setActivated(boolean activated)
Sets the row view's activated status.
|
void |
setOnItemViewClickedListener(BaseOnItemViewClickedListener listener)
Sets the listener for item click event.
|
void |
setOnItemViewSelectedListener(BaseOnItemViewSelectedListener listener)
Sets the listener for item or row selection.
|
void |
setOnKeyListener(View.OnKeyListener keyListener)
Sets a key listener.
|
void |
syncActivatedStatus(View view)
Synchronizes the activated status of view to the last value passed through
setActivated(boolean) . |
getFacet, setFacet
protected final ColorOverlayDimmer mColorDimmer
public ViewHolder(View view)
view
- The View bound to the Row.public final Row getRow()
Row
.Row
.public final Object getRowObject()
public final boolean isExpanded()
public final boolean isSelected()
public final float getSelectLevel()
public final RowHeaderPresenter.ViewHolder getHeaderViewHolder()
public final void setActivated(boolean activated)
syncActivatedStatus(View)
. Application should only call this function
when RowPresenter.getSyncActivatePolicy()
is
RowPresenter.SYNC_ACTIVATED_CUSTOM
; otherwise the value will
be overwritten when expanded or selected status changes.public final void syncActivatedStatus(View view)
setActivated(boolean)
. No operation if
setActivated(boolean)
is never called. Normally
application does not need to call this method, ListRowPresenter
automatically
calls this method when a child is attached to list row. However if
application writes its own custom RowPresenter, it should call this method
when attaches a child to the row view.public void setOnKeyListener(View.OnKeyListener keyListener)
public View.OnKeyListener getOnKeyListener()
public final void setOnItemViewSelectedListener(BaseOnItemViewSelectedListener listener)
ListRowPresenter
may
fire a selection event with selected item.public final BaseOnItemViewSelectedListener getOnItemViewSelectedListener()
public final void setOnItemViewClickedListener(BaseOnItemViewClickedListener listener)
View.OnClickListener
that
item presenter sets during Presenter.onCreateViewHolder(ViewGroup)
.public final BaseOnItemViewClickedListener getOnItemViewClickedListener()