public class BoxListItemAdapter extends
Modifier and Type | Class and Description |
---|---|
static class |
BoxListItemAdapter.ViewHolder
A ViewHolder to keep references to children views.
|
Constructor and Description |
---|
BoxListItemAdapter(Activity context,
ThumbnailManager manager)
Construct a new adapter.
|
Modifier and Type | Method and Description |
---|---|
void |
add(BoxAndroidCollection collection) |
void |
add(BoxListItem listItem) |
void |
addAll(BoxListItem... items) |
void |
addAll(java.util.Collection<? extends BoxListItem> collection) |
void |
clear() |
int |
getItemViewType(int position) |
View |
getView(int position,
View convertView,
ViewGroup parent) |
int |
getViewTypeCount() |
void |
remove(BoxListItem listItem) |
void |
remove(java.lang.String identifier)
Remove an item based on a given identifier
|
void |
set(BoxAndroidCollection collection) |
protected void |
update(BoxListItemAdapter.ViewHolder holder,
BoxListItem listItem)
Sets views with data from given box item.
|
void |
update(java.lang.String identifier)
Update a single item based on given identifier.
|
public BoxListItemAdapter(Activity context, ThumbnailManager manager)
context
- current context.public View getView(int position, View convertView, ViewGroup parent)
public int getItemViewType(int position)
public int getViewTypeCount()
protected void update(BoxListItemAdapter.ViewHolder holder, BoxListItem listItem)
holder
- The holder containing views to update.listItem
- the box to display.public void set(BoxAndroidCollection collection)
public void add(BoxAndroidCollection collection)
public void addAll(BoxListItem... items)
public void addAll(java.util.Collection<? extends BoxListItem> collection)
public void add(BoxListItem listItem)
public void remove(BoxListItem listItem)
public void update(java.lang.String identifier)
identifier
- identifier of item to update.public void remove(java.lang.String identifier)
identifier
- remove an item from this adapter with given identifier.public void clear()