public class DetailsOverviewRow extends Row
Row
for a details fragment. This row consists of an image, a
description view, and optionally a series of Action
s that can be taken for
the item.
setActionsAdapter(ObjectAdapter)
to set actions on the overview
row. SparseArrayObjectAdapter
is recommended for easily updating actions while
maintaining the order. The application can add or remove actions on the UI thread after the
row is bound to a view.
setItem(Object)
on UI thread and the view will be updated.
setImageBitmap(Context, Bitmap)
or setImageDrawable(Drawable)
on the UI thread,
and the view will be updated.Modifier and Type | Class and Description |
---|---|
static class |
DetailsOverviewRow.Listener
Listener for changes of DetailsOverviewRow.
|
Constructor and Description |
---|
DetailsOverviewRow(Object item)
Constructor for a DetailsOverviewRow.
|
Modifier and Type | Method and Description |
---|---|
void |
addAction(Action action)
Deprecated.
|
void |
addAction(int pos,
Action action)
Deprecated.
|
Action |
getActionForKeyCode(int keyCode)
Returns the Action associated with the given keycode, or null if no associated action exists.
|
List<Action> |
getActions()
Deprecated.
|
ObjectAdapter |
getActionsAdapter()
Returns the
ObjectAdapter for actions. |
Drawable |
getImageDrawable()
Returns the image drawable of this details overview.
|
Object |
getItem()
Returns the main item for the details page.
|
boolean |
isImageScaleUpAllowed()
Returns true if the image may be scaled up; false otherwise.
|
boolean |
removeAction(Action action)
Deprecated.
|
void |
setActionsAdapter(ObjectAdapter adapter)
Sets the
ObjectAdapter for actions. |
void |
setImageBitmap(Context context,
Bitmap bm)
Sets a Bitmap as the image of this details overview.
|
void |
setImageDrawable(Drawable drawable)
Sets a drawable as the image of this details overview.
|
void |
setImageScaleUpAllowed(boolean allowed)
Allows or disallows scaling up of images.
|
void |
setItem(Object item)
Sets the main item for the details page.
|
getHeaderItem, getId, isRenderedAsRowView, setHeaderItem, setId
public DetailsOverviewRow(Object item)
item
- The main item for the details page.public final Object getItem()
public final void setItem(Object item)
public final void setImageDrawable(Drawable drawable)
drawable
- The drawable to set.public final void setImageBitmap(Context context, Bitmap bm)
context
- The context to retrieve display metrics from.bm
- The bitmap to set.public final Drawable getImageDrawable()
public void setImageScaleUpAllowed(boolean allowed)
public boolean isImageScaleUpAllowed()
@Deprecated public final void addAction(Action action)
setActionsAdapter(ObjectAdapter)
and getActionsAdapter()
ArrayObjectAdapter
. Must be called on the UI thread.action
- The Action to add.@Deprecated public final void addAction(int pos, Action action)
setActionsAdapter(ObjectAdapter)
and getActionsAdapter()
ArrayObjectAdapter
. Must be called
on the UI thread.pos
- The position to insert the Action.action
- The Action to add.@Deprecated public final boolean removeAction(Action action)
setActionsAdapter(ObjectAdapter)
and getActionsAdapter()
ArrayObjectAdapter
. Must be called on UI thread.action
- The Action to remove.@Deprecated public final List<Action> getActions()
setActionsAdapter(ObjectAdapter)
and getActionsAdapter()
ArrayObjectAdapter
. Must be
called on UI thread.public final ObjectAdapter getActionsAdapter()
ObjectAdapter
for actions.public final void setActionsAdapter(ObjectAdapter adapter)
ObjectAdapter
for actions. A default PresenterSelector
will be
attached to the adapter if it doesn't have one.adapter
- Adapter for actions.public Action getActionForKeyCode(int keyCode)