-
public class ThreadListItemViewHolderFactoryFactory responsible for creating ViewHolder instances for the RecyclerView used in the io.getstream.chat.android.ui.feature.threads.list.ThreadListView.
-
-
Constructor Summary
Constructors Constructor Description ThreadListItemViewHolderFactory()
-
Method Summary
Modifier and Type Method Description IntegergetItemViewType(ThreadListItem item)Returns a view type value based on the type of the given item. IntegergetItemViewType(BaseThreadListItemViewHolder<out ThreadListItem> viewHolder)Returns a view type value based on the type of the given viewHolder. BaseThreadListItemViewHolder<out ThreadListItem>createViewHolder(ViewGroup parentView, Integer viewType)Creates a new ViewHolder based on the provided viewType to be used in the Thread List. -
-
Method Detail
-
getItemViewType
Integer getItemViewType(ThreadListItem item)
Returns a view type value based on the type of the given item. The view type returned here will be used as a parameter in createViewHolder.
For built-in view types, see ThreadListItemViewType and its constants.
- Parameters:
item- The ThreadListItem to check the type of.
-
getItemViewType
Integer getItemViewType(BaseThreadListItemViewHolder<out ThreadListItem> viewHolder)
Returns a view type value based on the type of the given viewHolder.
For built-in view types, see ThreadListItemViewType and its constants.
- Parameters:
viewHolder- The BaseThreadListItemViewHolder to check the type of.
-
createViewHolder
BaseThreadListItemViewHolder<out ThreadListItem> createViewHolder(ViewGroup parentView, Integer viewType)
Creates a new ViewHolder based on the provided viewType to be used in the Thread List. The viewType parameter is determined by getItemViewType.
- Parameters:
parentView- The parent of the view.viewType- The type of the item for which the viewHolder is created.
-
-
-
-