Class MessageListItemViewHolderFactory
-
- All Implemented Interfaces:
public class MessageListItemViewHolderFactoryA factory class designed to create ViewHolders for the RecyclerView inside io.getstream.chat.android.ui.feature.messages.list.MessageListView.
-
-
Constructor Summary
Constructors Constructor Description MessageListItemViewHolderFactory()
-
Method Summary
Modifier and Type Method Description IntegergetItemViewType(MessageListItem item)Returns a view type value based on the type and contents of the given item. IntegergetItemViewType(BaseMessageItemViewHolder<out MessageListItem> viewHolder)Returns a view type value based on the type of the given viewHolder. BaseMessageItemViewHolder<out MessageListItem>createViewHolder(ViewGroup parentView, Integer viewType)Creates a new ViewHolder to be used in the Message List. -
-
Method Detail
-
getItemViewType
Integer getItemViewType(MessageListItem item)
Returns a view type value based on the type and contents of the given item. The view type returned here will be used as a parameter in createViewHolder.
For built-in view types, see MessageListItemViewType and its constants.
-
getItemViewType
Integer getItemViewType(BaseMessageItemViewHolder<out MessageListItem> viewHolder)
Returns a view type value based on the type of the given viewHolder. The view type returned here will be used in MessageListItemAdapter.onBindViewHolder to check if the ViewHolder is of the correct type before binding the item.
For built-in view types, see MessageListItemViewType and its constants.
-
createViewHolder
BaseMessageItemViewHolder<out MessageListItem> createViewHolder(ViewGroup parentView, Integer viewType)
Creates a new ViewHolder to be used in the Message List. The viewType parameter is determined by getItemViewType.
-
-
-
-