Is there any way to redraw all items of RecyclerView
?
I have some Themes (in style.xml) and after changing the theme, I need the RecyclerView
t
I know this is old, but I had a situation where I needed to change the viewholder types after notifyDataSetChanged()
. If the adapter already had data, onCreateViewHolder
was not being called because of the "recycle" part of recycleviewadapter, so a type cast error was being thrown in onBindViewHolder
.
I was able to solve this by calling myRecyclerView.getLayoutManager().removeAllViews();
before calling notifyDataSetChanged();
on the adapter.