RecyclerView with LinearLayoutManager with a header that does not recycle

I want the ListView style to have a RecyclerView with a title at the top, and I don't want the title to be displayed again, EVER.

I am completely new to RecyclerView and LinearLayoutManager , but I think I should not be too complicated extending the LinearLayoutManager .

Additional information if necessary, but I think this is enough:

I already have a RecyclerView with a title representation at position 0. This part was fairly simple with SO answers. But the view is processed, which causes many problems with the EditText views in the header (an attempt to maintain focus, restore focus, maintain visibility, not do strange things with the automatic correction function, continue to print, and EditText is technically absent / recycled, etc.). So a simple solution is to not use this view, which I think is possible with the layout manager, but I don’t know where to start.

I can't just put a title above my list because I want it to scroll through the list (it's too tall to be fixed at the top of the screen).

+5
source share
1 answer

LayoutManager has an interface LayoutManager # ignoreView (View) , which according to the documentation,

Mark the presentation so that it is not disposed of or recycled.

It looks like you need here

EDIT Google developers commented ( here ) that this flag serves other purposes, so it is not going to solve the "RecyclerView Header" problem. However, they are working on a solution, so hold on to tight tuning and support it.

+1
source

All Articles