I have RecyclerViewas below:

This is the installation code for this RecyclerView:
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(this, 2);
dataRecyclerView.setLayoutManager(layoutManager);
dataRecyclerView.addItemDecoration(new GridSpacingItemDecoration(...);
dataRecyclerView.setItemAnimator(new DefaultItemAnimator());
after starting a new action, when I update the selected RecyclerView element, the RecyclerView is re-populated with new data to reflect the new change, but I get the following result:

And when I scroll down, I get this space:

I tried to call RecyclerView#invalidate(), #invalidateItemDecorations(), #requestLayout()after the update, but to no avail; and I also do not call setHasFixedSize(true)on RecyclerView.
What is the problem? How to resize child elements so that they flow around their contents after the update?
(P.S: , , , .)