public class ViewHolder
extends RecyclerView.ViewHolder
findViewById-method calls when reusing these views.| Constructor and Description |
|---|
ViewHolder(android.view.View parentView)
Creates a new view holder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all references, which are stored by the view holder.
|
android.view.View |
findViewById(int viewId)
Returns the view, which belongs to a specific resource ID.
|
android.view.View |
getParentView()
Returns the view, the view holder is associated with.
|
public ViewHolder(android.view.View parentView)
parentView - The view, the view holder is associated with, as an instance of the class View. The view may not be nullpublic final android.view.View getParentView()
View. The view may not be nullpublic final android.view.View findViewById(int viewId)
findViewById(int):View of the parent view, the view holder belongs to, is
used to reference the view.viewId - The resource ID of the view, which should be returned, as an Integer value.
The ID must be a valid resource ID of a view, which belongs to the given parent viewView or null, if no view with the given ID is availablepublic final void clear()