truizlop / SectionedRecyclerView

An adapter to create Android RecyclerViews with sections, providing headers and footers.
806 stars 144 forks source link

Is there a way to add extra itemTypes #19

Closed Qoderapps closed 7 years ago

Qoderapps commented 7 years ago

I see that you are using itemTypes for the footers and headers. I'd like to have a section using other viewHolder type. I haven't digged enough to be sure that another type is possible.

public int getItemViewType(int position);

Is there a way to get section index inside this method?

truizlop commented 7 years ago

Of course, it is possible. Override method getSectionItemViewType(section, position) and make sure you provide different view type identifiers than the used for headers and footers.

Qoderapps commented 7 years ago

Thanx :) I expected something like this but didn's see it. Great library btw.

truizlop commented 7 years ago

Thanks for your feedback!