Closed mgefimov closed 6 years ago
Override getSectionItemViewType and return item type, onCreateItemViewHolder's itemType will be your custom item type.
I override this method inside my item holder, but onCreateItemViewHolder's itemType is 0 for every time (
oh, sorry, i had override getSectionItemViewType(int section, int offset) method. Thank you for help 👍
Note that due to the bitmask tricks with externalType
and internalType
, viewType
values greater than 255 won't work correctly! So, using eg. R.layout.my_layout
as a view type is not a good idea.
Hello, great work! How i can change item view type? I want use in 3 first items different view. How i can do it?