public interface IItem<T,VH extends RecyclerView.ViewHolder> extends IIdentifyable<T>
| Modifier and Type | Method and Description |
|---|---|
void |
attachToWindow(VH holder)
View got attached to the window
|
void |
bindView(VH holder,
java.util.List<java.lang.Object> payloads)
Binds the data of this item to the given holder
|
void |
detachFromWindow(VH holder)
View got detached from the window
|
boolean |
equals(int id)
If this item equals to the given identifier
|
boolean |
failedToRecycle(VH holder)
View is in a transient state and could not be recycled
|
android.view.View |
generateView(android.content.Context ctx)
generates a view by the defined LayoutRes
|
android.view.View |
generateView(android.content.Context ctx,
android.view.ViewGroup parent)
generates a view by the defined LayoutRes and pass the LayoutParams from the parent
|
int |
getLayoutRes()
returns the layout for the given item
|
java.lang.Object |
getTag()
return a Tag of the Item
|
int |
getType()
returns the type of the Item.
|
VH |
getViewHolder(android.view.ViewGroup parent)
Generates a ViewHolder from this Item with the given parent
|
boolean |
isEnabled()
return if the item is enabled
|
boolean |
isSelectable()
return if the item is selectable
|
boolean |
isSelected()
return if the item is selected
|
void |
unbindView(VH holder)
View needs to release resources when its recycled
|
T |
withEnabled(boolean enabled)
set if the item is enabled
|
T |
withSelectable(boolean selectable)
set if the item is selectable
|
T |
withSetSelected(boolean selected)
set if the item is selected
|
T |
withTag(java.lang.Object tag)
set the Tag of the Item
|
getIdentifier, withIdentifierjava.lang.Object getTag()
T withTag(java.lang.Object tag)
tag - boolean isEnabled()
T withEnabled(boolean enabled)
enabled - boolean isSelected()
T withSetSelected(boolean selected)
selected - boolean isSelectable()
T withSelectable(boolean selectable)
selectable - int getType()
int getLayoutRes()
android.view.View generateView(android.content.Context ctx)
ctx - android.view.View generateView(android.content.Context ctx,
android.view.ViewGroup parent)
ctx - parent - VH getViewHolder(android.view.ViewGroup parent)
parent - void bindView(VH holder, java.util.List<java.lang.Object> payloads)
holder - payloads - void unbindView(VH holder)
holder - void attachToWindow(VH holder)
holder - void detachFromWindow(VH holder)
holder - boolean failedToRecycle(VH holder)
holder - boolean equals(int id)
id -