Headers not updating when calling notifyDataSetChanged on adapter #30
Comments
Thanks for the report, should be a quick fix. We'll look into it right away.
|
My headers appear but without text, background only. Can be the same issue? |
Doesn't sound related, please feel free to open another issue with code
sample and we can look into it. Specifically the header view holder
creation and binding.
|
Yes, you are right. The problem was the text view style. I added a new issue: |
Any follow up on this? |
Sorry for the delay. You can call |
@meilers The decoration isn't directly aware of the RecyclerView's adapter so there's no way to do this automatically. I recommend you add this code when creating your RecyclerView.Adapter:
|
Awesome Jacob. Thanks! |
@jacobtabak I've encountered a similar problem when using the sticky headers. I update the list by swapping out the cursor and calling notifydatasetchanged(). When one extra item is added to the top of the list the entire list expands downwards but the headers remain static (thus in the wrong position by one step). Any ideas? I've tried invalidating the headers but it does not seem to solve the issue. |
Nothing sticks out - but if you can post a sample app to github that reproduce the issue I can take a look. |
@jacobtabak I found the fix, apparently I had to:
like this:
|
This really shouldn't be necessary. |
in sticky header i have check box, when check box checked notify the recyclerview, but not getting refreshed, after scroll, then it is getting refershed. so how to refresh the recyclerview with out scroll |
Since the headers are just decorations they are not interactive. So check On Fri, Mar 4, 2016, 10:52 PM venkataramanaj notifications@github.com
|
I use a cursorloader that updates the adapter data set by calling notifyDataSetChanged. All the cells that aren't sticky get updated, but not the sticky headers. In fact, onBindHeaderViewHolder doesn't get called at all.
The text was updated successfully, but these errors were encountered: