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

Sticky item with different layout #412

Open cristin opened 8 years ago

cristin commented 8 years ago

I want to know if I can use this library and how to create the following list effect.

I want always the first displayed item from a list (lets call this a focused item) to have a different layout then the other items. When I scroll each item will receive focus, one by one.

For example if I have items 1,2,3 displayed on screen, item 1 will have focus and a different layout. When I scroll down item 1 will be replaced in the focused layout with item 2 and on screen we will have: item 2 (has focus and is displayed with a different layout in top part of the list), items 3 and 4. If I scroll again item 2 will be replaced in the focused layout with item 3 and on screen we will have: item 3 (has focus and is displayed with a different layout in top part of the list), items 4 and 5.

Any suggestions?