-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Milestone
Description
Sometime if you adding ur custom view as the header view and it will not be recycled because it is not the same view type as the other normal views in the recycler view. I have read about the implementation today and hopefully i can adding this into the library so that there we will have TWO ways to implement header for different situation.
- The simple way. Using the old traditional way.
listview.setNormalHeader(View your_initialized_custom_view);
But this will cause exception issue from the recycler view.
- The more complex Views.
Here is my work in progress
Now I am current looking for the implementation of ignoreView
because i still trying to understand more of when to use this call.
/**
* Flags a view so that it will not be scrapped or recycled.
* <p>
* Scope of ignoring a child is strictly restricted to position tracking, scrapping and
* recyling. Methods like {@link #removeAndRecycleAllViews(Recycler)} will ignore the child
* whereas {@link #removeAllViews()} or {@link #offsetChildrenHorizontal(int)} will not
* ignore the child.
* <p>
* Before this child can be recycled again, you have to call
* {@link #stopIgnoringView(View)}.
* <p>
* You can call this method only if your LayoutManger is in onLayout or onScroll callback.
*
* @param view View to ignore.
* @see #stopIgnoringView(View)
*/
As I read from the currently status it is not gonna solve the header issue. This is commented from the dev team in google.