-
- All Implemented Interfaces:
-
android.view.View.OnClickListener,android.view.View.OnLongClickListener
public abstract class ClickableGridViewAdapter<T extends Object, VH extends RecyclerView.ViewHolder> extends GridViewAdapter<T, VH> implements View.OnClickListener, View.OnLongClickListener
ClickableGridViewAdapter
-
-
Constructor Summary
Constructors Constructor Description ClickableGridViewAdapter()
-
Method Summary
Modifier and Type Method Description UnitonBindViewHolder(VH holder, Integer position, Integer pagePosition, T item)Called by RecyclerView to display the data at the specified position. final UnitonClick(View view)final BooleanonLongClick(View view)Booleanclickable(Integer position, Integer pagePosition)Whether the adapter item can click BooleanlongClickable(Integer position, Integer pagePosition)Whether the adapter item can long click UnitonItemClick(View view, T item, Integer position, Integer pagePosition)Called when a item view has been clicked. BooleanonItemLongClick(View view, T item, Integer position, Integer pagePosition)Called when a item view has been clicked and held. -
-
Method Detail
-
onBindViewHolder
Unit onBindViewHolder(VH holder, Integer position, Integer pagePosition, T item)
Called by RecyclerView to display the data at the specified position. This method should update the contents of the RecyclerView.ViewHolder.itemView to reflect the item at the given position.
- Parameters:
holder- The ViewHolder which should be updated to represent the contents of the item at the given position in the data set.position- The position of the item within the adapter's data set.pagePosition- The position of the item within the page`s data set.item- The data of current position.
-
onLongClick
final Boolean onLongClick(View view)
-
clickable
Boolean clickable(Integer position, Integer pagePosition)
Whether the adapter item can click
-
longClickable
Boolean longClickable(Integer position, Integer pagePosition)
Whether the adapter item can long click
-
onItemClick
Unit onItemClick(View view, T item, Integer position, Integer pagePosition)
Called when a item view has been clicked.
-
-
-
-