ItemType - The type of the items, which should be visualized by inflated viewsParamType - The type of the optional parameters, which may be passed when inflating a viewpublic class ViewRecycler<ItemType,ParamType> extends AbstractViewRecycler<ItemType,ParamType>
AbstractViewRecycler.Adapter<ItemType,ParamType>| Constructor and Description |
|---|
ViewRecycler(android.content.Context context)
Creates a new recycler, which allows to cache views in order to be able to reuse them later,
instead of inflating new instances.
|
ViewRecycler(android.view.LayoutInflater inflater)
Creates a new recycler, which allows to cache views in order to be able to reuse them later,
instead of inflating new instances.
|
| Modifier and Type | Method and Description |
|---|---|
<any> |
inflate(ItemType item,
boolean useCache,
ParamType... params)
Inflates the view, which is used to visualize a specific item.
|
<any> |
inflate(ItemType item,
android.view.ViewGroup parent,
boolean useCache,
ParamType... params)
Inflates the view, which is used to visualize a specific item.
|
<any> |
inflate(ItemType item,
android.view.ViewGroup parent,
ParamType... params)
Inflates the view, which is used to visualize a specific item.
|
void |
remove(ItemType item)
Removes a previously inflated view, which is used to visualize a specific item.
|
void |
removeAll()
Removes all previously inflated views.
|
addUnusedView, clearCache, clearCache, getActiveViews, getAdapter, getContext, getLayoutInflater, getLogger, getLogLevel, getView, inflate, isCacheUsed, isInflated, pollUnusedView, setAdapter, setLogLevel, useCachepublic ViewRecycler(android.content.Context context)
context - The context, which should be used by the recycler, as an instance of the class Context. The context may not be nullpublic ViewRecycler(android.view.LayoutInflater inflater)
inflater - The layout inflater, which should be used to inflate views, as an instance of the
class LayoutInflater. The layout inflater may not be null@SafeVarargs public final <any> inflate(ItemType item, android.view.ViewGroup parent, ParamType... params)
item - The item, which should be visualized by the inflated view, as an instance of the
generic type ItemType. The item may not be nullparent - The parent of the inflated view as an instance of the class ViewGroup or
null, if no parent is availableparams - An array, which may contain optional parameters, as an array of the generic type
ParamType or an empty array, if no optional parameters are available@SafeVarargs public final <any> inflate(ItemType item, android.view.ViewGroup parent, boolean useCache, ParamType... params)
item - The item, which should be visualized by the inflated view, as an instance of the
generic type ItemType. The item may not be nullparent - The parent of the inflated view as an instance of the class ViewGroup or
null, if no parent is availableuseCache - True, if an unused view should retrieved from the cache, if possible, false, if a new
instance should be inflated insteadparams - An array, which may contain optional parameters, as an array of the generic type
ParamType or an empty array, if no optional parameters are available@SafeVarargs public final <any> inflate(ItemType item, boolean useCache, ParamType... params)
AbstractViewRecyclerinflate in class AbstractViewRecycler<ItemType,ParamType>item - The item, which should be visualized by the inflated view, as an instance of the
generic type ItemType. The item may not be nulluseCache - True, if an unused view should retrieved from the cache, if possible, false, if a new
instance should be inflated insteadparams - An array, which may contain optional parameters, as an array of the generic type
ParamType or an empty array, if no optional parameters are availablepublic final void remove(ItemType item)
AbstractViewRecyclerremove in class AbstractViewRecycler<ItemType,ParamType>item - The item, which is visualized by the view, which should be removed, as an instance of
the generic type ItemType. The item may not be nullpublic final void removeAll()
AbstractViewRecyclerremoveAll in class AbstractViewRecycler<ItemType,ParamType>