Open omrital opened 7 years ago
@Override
public int getSectionItemUserType(int sectionIndex, int itemIndex) {
}
In this you will define which item type
@Override
public ItemViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType) {
if (viewType == MESSAGE_TYPE_AUTHOR) {
View view = LayoutInflater.from(context).inflate(R.layout.author_message_list_item, parent, false);
return new MessageSectionedAdapter.AuthorViewHolder(view);
} else if (viewType == MESSAGE_TYPE_RECIPIENT) {
View view = LayoutInflater.from(context).inflate(R.layout.recipient_message_list_item, parent, false);
return new MessageSectionedAdapter.RecipientViewHolder(view);
}
return null;
}
Hope that help
hi, is it possible to implement different types of view for item row ? i tried to do so according to the adapter functions but i found it not really possible. if there is a way please share thank you for your time !