ListItemViewHolder


public class ListItemViewHolder


A flexible ViewHolder provides utility methods for binding a ListItemLayout based on an item count and position. ListItemViewHolder expects a ListItemLayout as the root itemView, or as a direct child of the itemView.

Summary

Public constructors

ListItemViewHolder(View itemView)

Public methods

void

Binds the corresponding ListItemLayout to the adapter position by calling updateAppearance.

void

Binds the corresponding ListItemLayout according to the given ListItemLayout.Position.

void
bind(int position, int itemCount)

Binds the corresponding ListItemLayout according given position and item count.

Public constructors

ListItemViewHolder

public ListItemViewHolder(View itemView)

Public methods

bind

public void bind()

Binds the corresponding ListItemLayout to the adapter position by calling updateAppearance.

bind

public void bind(@ListItemLayout.Position int position)

Binds the corresponding ListItemLayout according to the given ListItemLayout.Position.

bind

public void bind(int position, int itemCount)

Binds the corresponding ListItemLayout according given position and item count. If there are several sections in the list, the position and item count given should be relative to its section.