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 |
|---|---|
FastItemAdapter<Item> |
add(int position,
Item... items)
add an array of items at the given position within the existing items
|
FastItemAdapter<Item> |
add(int position,
Item item)
add an item at the given position within the existing icons
|
FastItemAdapter<Item> |
add(int position,
java.util.List<Item> items)
add a list of items at the given position within the existing items
|
FastItemAdapter<Item> |
add(Item... items)
add an array of items to the end of the existing items
|
FastItemAdapter<Item> |
add(Item item)
add an item at the end of the existing items
|
FastItemAdapter<Item> |
add(java.util.List<Item> items)
add a list of items to the end of the existing items
|
FastItemAdapter<Item> |
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() |
FastItemAdapter<Item> |
move(int fromPosition,
int toPosition)
moves an item within the list from a position to a position
|
FastItemAdapter<Item> |
remove(int position)
removes an item at the given position within the existing icons
|
FastItemAdapter<Item> |
removeItemRange(int position,
int itemCount)
removes a range of items starting with the given position within the existing icons
|
FastItemAdapter<Item> |
set(int position,
Item item)
sets an item at the given position, overwriting the previous item
|
FastItemAdapter<Item> |
set(java.util.List<Item> items)
set a new list of items and apply it to the existing list (clear - add) for this adapter
|
FastItemAdapter<Item> |
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, getExpanded, getExpandedItems, getExpandedItemsCount, getItem, getItemCount, getItemId, getItemViewType, getPosition, getPreItemCount, getPreItemCountByOrder, getRelativeInfo, getSelectedItems, getSelections, getTypeInstance, isSelectable, notifyAdapterDataSetChanged, notifyAdapterItemChanged, notifyAdapterItemChanged, notifyAdapterItemInserted, notifyAdapterItemMoved, notifyAdapterItemRangeChanged, notifyAdapterItemRangeChanged, notifyAdapterItemRangeInserted, notifyAdapterItemRangeRemoved, notifyAdapterItemRemoved, notifyAdapterSubItemsChanged, onBindViewHolder, onCreateViewHolder, registerAdapter, registerTypeInstance, saveInstanceState, saveInstanceState, select, select, select, toggleExpandable, toggleSelection, withAllowDeselection, withMultiSelect, withOnBindViewHolderListener, withOnClickListener, withOnCreateViewHolderListener, withOnLongClickListener, withOnPreClickListener, withOnPreLongClickListener, withOnTouchListener, withSavedInstanceState, withSavedInstanceState, withSelectable, 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 FastItemAdapter<Item> set(java.util.List<Item> items)
items - the new items to setpublic FastItemAdapter<Item> setNewList(java.util.List<Item> items)
items - the new items to set@SafeVarargs public final FastItemAdapter<Item> add(Item... items)
items - the items to addpublic FastItemAdapter<Item> add(java.util.List<Item> items)
items - the items to add@SafeVarargs public final FastItemAdapter<Item> add(int position, Item... items)
position - the global positionitems - the items to addpublic FastItemAdapter<Item> add(int position, java.util.List<Item> items)
position - the global positionitems - the items to addpublic FastItemAdapter<Item> set(int position, Item item)
position - the global positionitem - the item to setpublic FastItemAdapter<Item> add(Item item)
item - the item to addpublic FastItemAdapter<Item> add(int position, Item item)
position - the global positionitem - the item to addpublic FastItemAdapter<Item> move(int fromPosition, int toPosition)
fromPosition - the position global from which we want to movetoPosition - the global position to which to movepublic FastItemAdapter<Item> remove(int position)
position - the global positionpublic FastItemAdapter<Item> removeItemRange(int position, int itemCount)
position - the global positionitemCount - the count of items removedpublic FastItemAdapter<Item> clear()