public class ButtonBarItem extends AbstractItem implements ItemInflater.ItemParent
ButtonItem
.
Example usage:
<ButtonBarItem>
<ButtonItem
android:id="@+id/skip_button"
android:text="@string/skip_button_label />
<ButtonItem
android:id="@+id/next_button"
android:text="@string/next_button_label
android:theme="@style/SuwButtonItem.Colored" />
</ButtonBarItem>
ItemHierarchy.Observer
Constructor and Description |
---|
ButtonBarItem() |
ButtonBarItem(Context context,
AttributeSet attrs) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(ItemHierarchy child) |
ItemHierarchy |
findItemById(int id)
Find an item hierarchy within this hierarchy which has the given ID.
|
int |
getCount() |
int |
getLayoutResource()
Get the Android resource ID for locating the layout for this item.
|
int |
getViewId() |
boolean |
isEnabled() |
boolean |
isVisible() |
void |
onBindView(View view)
Called by items framework to display the data specified by this item.
|
void |
setVisible(boolean visible) |
getItemAt
getId, notifyChanged, registerObserver, setId, unregisterObserver
public ButtonBarItem()
public ButtonBarItem(Context context, AttributeSet attrs)
public int getCount()
getCount
in interface ItemHierarchy
getCount
in class AbstractItem
public boolean isEnabled()
public int getLayoutResource()
IItem
getLayoutResource
in interface IItem
IItem.onBindView(android.view.View)
.public void setVisible(boolean visible)
public boolean isVisible()
public int getViewId()
public void onBindView(View view)
IItem
view
to reflect its data.onBindView
in interface IItem
view
- A view inflated from IItem.getLayoutResource()
, which should be updated to
display data from this item. This view may be recycled from other items with the
same layout resource.public void addChild(ItemHierarchy child)
addChild
in interface ItemInflater.ItemParent
public ItemHierarchy findItemById(int id)
ItemHierarchy
findItemById
in interface ItemHierarchy
findItemById
in class AbstractItem
id
- An ID to search for in this item hierarchy.