public class FastItemAdapter<Item extends com.mikepenz.fastadapter.IItem>
extends com.mikepenz.fastadapter.FastAdapter<Item>
com.mikepenz.fastadapter.FastAdapter.OnBindViewHolderListener, com.mikepenz.fastadapter.FastAdapter.OnBindViewHolderListenerImpl, com.mikepenz.fastadapter.FastAdapter.OnClickListener<Item extends com.mikepenz.fastadapter.IItem>, com.mikepenz.fastadapter.FastAdapter.OnCreateViewHolderListener, com.mikepenz.fastadapter.FastAdapter.OnCreateViewHolderListenerImpl, com.mikepenz.fastadapter.FastAdapter.OnLongClickListener<Item extends com.mikepenz.fastadapter.IItem>, com.mikepenz.fastadapter.FastAdapter.OnTouchListener<Item extends com.mikepenz.fastadapter.IItem>, com.mikepenz.fastadapter.FastAdapter.RelativeInfo<Item extends com.mikepenz.fastadapter.IItem>| 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 its relative position
|
int |
getGlobalPosition(int position)
returns the global position if the relative position within this adapter was given
|
com.mikepenz.fastadapter.adapters.ItemAdapter<Item> |
getItemAdapter()
returns the internal created ItemAdapter
|
com.mikepenz.fastadapter.adapters.ItemFilter<Item> |
getItemFilter() |
int |
getOrder() |
FastItemAdapter<Item> |
move(int fromPosition,
int toPosition)
moves an item within the list from a position to a position
|
void |
remapMappedTypes()
convenient functions, to force to remap all possible types for the RecyclerView
|
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.
|
FastItemAdapter<Item> |
setNewList(java.util.List<Item> items,
boolean retainFilter)
sets a complete new list of items onto this adapter, using the new list.
|
<T extends com.mikepenz.fastadapter.IItem & com.mikepenz.fastadapter.IExpandable<T,S>,S extends com.mikepenz.fastadapter.IItem & com.mikepenz.fastadapter.ISubItem<Item,T>> |
setSubItems(T collapsible,
java.util.List<S> subItems)
sets the subItems of the given collapsible
This method also makes sure identifiers are set if we use the IdDistributor
|
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
|
clearTypeInstance, collapse, collapse, collapse, collapse, deleteAllSelectedItems, deselect, deselect, deselect, enableVerboseLog, expand, expand, expand, expand, getAdapter, getExpanded, getExpandedItems, getExpandedItemsCount, getHolderAdapterPosition, getItem, getItemCount, getItemId, getItemViewType, getPosition, getPosition, getPreItemCount, getPreItemCountByOrder, getRelativeInfo, getSelectedItems, getSelections, getTypeInstance, isOnlyOneExpandedItem, isPositionBasedStateManagement, isSelectable, notifyAdapterDataSetChanged, notifyAdapterItemChanged, notifyAdapterItemChanged, notifyAdapterItemInserted, notifyAdapterItemMoved, notifyAdapterItemRangeChanged, notifyAdapterItemRangeChanged, notifyAdapterItemRangeInserted, notifyAdapterItemRangeRemoved, notifyAdapterItemRemoved, notifyAdapterSubItemsChanged, notifyAdapterSubItemsChanged, onAttachedToRecyclerView, onBindViewHolder, onBindViewHolder, onCreateViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapter, registerTypeInstance, saveInstanceState, saveInstanceState, select, select, select, select, select, select, toggleExpandable, toggleSelection, withAllowDeselection, withEventHook, withEventHooks, withItemEvent, withLegacyBindViewMode, withMultiSelect, withOnBindViewHolderListener, withOnClickListener, withOnCreateViewHolderListener, withOnLongClickListener, withOnlyOneExpandedItem, withOnPreClickListener, withOnPreLongClickListener, withOnTouchListener, withPositionBasedStateManagement, withSavedInstanceState, withSavedInstanceState, withSelectable, withSelectionListener, withSelectOnLongClick, withSelectWithItemUpdatebindViewHolder, createViewHolder, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserverpublic com.mikepenz.fastadapter.adapters.ItemAdapter<Item> getItemAdapter()
public FastItemAdapter<Item> withUseIdDistributor(boolean useIdDistributor)
useIdDistributor - false if the IdDistributor shouldn't be usedpublic com.mikepenz.fastadapter.adapters.ItemFilter<Item> getItemFilter()
public 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 extends com.mikepenz.fastadapter.IItem & com.mikepenz.fastadapter.IExpandable<T,S>,S extends com.mikepenz.fastadapter.IItem & com.mikepenz.fastadapter.ISubItem<Item,T>> T setSubItems(T collapsible, java.util.List<S> 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 setpublic FastItemAdapter<Item> setNewList(java.util.List<Item> items, boolean retainFilter)
items - the new items to setretainFilter - set to true if you want to keep the filter applied@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()
public void remapMappedTypes()