cymcsg / UltimateRecyclerView

A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features.
Apache License 2.0
7.22k stars 1.43k forks source link

multiple view adapter with sticky header #419

Open Studentessa opened 8 years ago

Studentessa commented 8 years ago

Hi:

Is it possible to have sticky header with UltimateDifferentViewTypeAdapter? Because when I extend my adapter from UltimateDifferentViewTypeAdapter and not from UltimateViewAdapter the method generateHeaderId() is never called even if I had set StickyRecyclerHeadersDecoration to my recyclerview.

thanks

PabloDesiderioFlores commented 7 years ago

Same question here.

PabloDesiderioFlores commented 7 years ago

In your activity you must use StickyRecyclerHeadersDecoration headersDecor = new StickyRecyclerHeadersDecoration(mAdapter);

mUltimateRecyclerView.addItemDecoration(headersDecor);

then generateHeaderId will be call.

Studentessa commented 7 years ago

Thanks @PabloDesiderioFlores I'll try! ;)