public class FastItemAdapter<Item extends IItem> extends FastAdapter<Item>
FastAdapter.OnBindViewHolderListener, FastAdapter.OnBindViewHolderListenerImpl, FastAdapter.OnClickListener<Item extends IItem>, FastAdapter.OnCreateViewHolderListener, FastAdapter.OnCreateViewHolderListenerImpl, FastAdapter.OnLongClickListener<Item extends IItem>, FastAdapter.OnTouchListener<Item extends IItem>, FastAdapter.RelativeInfo<Item extends IItem>BUNDLE_EXPANDED, BUNDLE_SELECTIONS| Constructor and Description |
|---|
FastItemAdapter()
ctor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int position,
Item... items)
add an array of items at the given position within the existing items
|
void |
add(int position,
Item item)
add an item at the given position within the existing icons
|
void |
add(int position,
java.util.List<Item> items)
add a list of items at the given position within the existing items
|
void |
add(Item... items)
add an array of items to the end of the existing items
|
void |
add(Item item)
add an item at the end of the existing items
|
void |
add(java.util.List<Item> items)
add a list of items to the end of the existing items
|
void |
clear()
removes all items of this adapter
|
void |
filter(java.lang.CharSequence constraint)
filters the items with the constraint using the provided Predicate
|
Item |
getAdapterItem(int position) |
int |
getAdapterItemCount() |
java.util.List<Item> |
getAdapterItems() |
int |
getAdapterPosition(Item item)
Searches for the given item and calculates it's relative position
|
int |
getGlobalPosition(int position)
returns the global position if the relative position within this adapter was given
|
ItemAdapter<Item> |
getItemAdapter()
returns the internal created ItemAdapter
|
ItemAdapter.ItemFilter |
getItemFilter() |
int |
getOrder() |
void |
remove(int position)
removes an item at the given position within the existing icons
|
void |
removeItemRange(int position,
int itemCount)
removes a range of items starting with the given position within the existing icons
|
void |
set(int position,
Item item)
sets an item at the given position, overwriting the previous item
|
void |
set(java.util.List<Item> items)
set a new list of items and apply it to the existing list (clear - add) for this adapter
|
void |
setNewList(java.util.List<Item> items)
sets a complete new list of items onto this adapter, using the new list.
|
<T> T |
setSubItems(IExpandable<T,Item> collapsible,
java.util.List<Item> subItems)
sets the subItems of the given collapsible
This method also makes sure identifiers are set if we use the IdDistributor
|
FastItemAdapter<Item> |
withFilterPredicate(IItemAdapter.Predicate<Item> filterPredicate)
define the predicate used to filter the list inside the ItemFilter
|
FastItemAdapter<Item> |
withUseIdDistributor(boolean useIdDistributor)
defines if the IdDistributor is used to provide an ID to all added items which do not yet define an id
|
collapse, collapse, deleteAllSelectedItems, deselect, deselect, deselect, expand, getAdapter, getExpandedItems, getItem, getItemCount, getItemCount, getItemId, getItemViewType, getPosition, getRelativeInfo, getSelectedItems, getSelections, getTypeInstances, notifyAdapterDataSetChanged, notifyAdapterItemChanged, notifyAdapterItemChanged, notifyAdapterItemInserted, notifyAdapterItemMoved, notifyAdapterItemRangeChanged, notifyAdapterItemRangeChanged, notifyAdapterItemRangeInserted, notifyAdapterItemRangeRemoved, notifyAdapterItemRemoved, onBindViewHolder, onCreateViewHolder, registerAdapter, registerTypeInstance, saveInstanceState, saveInstanceState, select, select, select, toggleExpandable, toggleSelection, withAllowDeselection, withMultiSelect, withOnBindViewHolderListener, withOnClickListener, withOnCreateViewHolderListener, withOnLongClickListener, withOnPreClickListener, withOnPreLongClickListener, withOnTouchListener, withSavedInstanceState, withSavedInstanceState, withSelectOnLongClick, withSelectWithItemUpdatebindViewHolder, createViewHolder, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserverpublic ItemAdapter<Item> getItemAdapter()
public FastItemAdapter<Item> withUseIdDistributor(boolean useIdDistributor)
useIdDistributor - false if the IdDistributor shouldn't be usedpublic ItemAdapter.ItemFilter getItemFilter()
public FastItemAdapter<Item> withFilterPredicate(IItemAdapter.Predicate<Item> filterPredicate)
filterPredicate - the predicate used to filter the list inside the ItemFilterpublic void filter(java.lang.CharSequence constraint)
constraint - the string used to filter the listpublic int getOrder()
public int getAdapterItemCount()
public java.util.List<Item> getAdapterItems()
public int getAdapterPosition(Item item)
item - the item which is searched forpublic int getGlobalPosition(int position)
position - the relative postionpublic Item getAdapterItem(int position)
position - the relative positionpublic <T> T setSubItems(IExpandable<T,Item> collapsible, java.util.List<Item> subItems)
collapsible - the collapsible which gets the subItems setsubItems - the subItems for this collapsible itempublic void set(java.util.List<Item> items)
items - the new items to setpublic void setNewList(java.util.List<Item> items)
items - the new items to set@SafeVarargs public final void add(Item... items)
items - the items to addpublic void add(java.util.List<Item> items)
items - the items to add@SafeVarargs
public final void add(int position,
Item... items)
position - the global positionitems - the items to addpublic void add(int position,
java.util.List<Item> items)
position - the global positionitems - the items to addpublic void set(int position,
Item item)
position - the global positionitem - the item to setpublic void add(Item item)
item - the item to addpublic void add(int position,
Item item)
position - the global positionitem - the item to addpublic void remove(int position)
position - the global positionpublic void removeItemRange(int position,
int itemCount)
position - the global positionitemCount - the count of items removedpublic void clear()