Ramotion/folding-cell-android

Content_view height is not adjusting accordingly to wrap_contents when inner layout height changes dynamically

prashantkh19 opened this issue · 5 comments

I have a recycler view and folding cell as its items. And in folding cell, I have another recycler view in content_view. Recycler view and content_view both are set as wrap_contents. Now the problem I am facing is..when the items in inner recycler view is added or deleted dynamically, the height of the content view doesn't change, it remains same as when the cell is unfolded. When I fold and unfold the cell again, then the height changes.

@RamotionDev is there any solution for this issue?

couldn't find any.. still looking for it.

@prashantkh19, @tallevi12 , You might be using notifyDataSetChanged() this is not the efficient way, maybe you should try DiffUtil. If it solves your problem, that's great, else share your project with me will make the desired changes!
Good luck

Hi.! Have you found any solution for this? I am using a recyclerview in the unfolded state and the height does not changing dynamically.

Hello. @gsrathoreniks is right about this question. Your inner recycler gets the update, but your outer recycler doesn't know about the data change. So you should tell to your outer recyclerview, that data changed. You may call notifyDataSetChanged() on the outer recycler.