epoxy
epoxy copied to clipboard
RecyclerView's wrap_content constrained height not updating
Hello everyone,
using Epoxy I stumbled upon a problem which I narrowed down to being a possible problem at the library's end.
I am using a RecyclerView which height="wrap_content". So, I expect the height to recalculate whenever the data changes. Unfortunately, this does not happen. When I click on one of the items, I re-set the data and all the diffing works properly. Nonetheless, the height is not re-calculated (onMeasure() of the RecyclerView is not called at all).

When I manually force the RecyclerView to update its height (e.g. by opening the keyboard), the height recalculates. Recreating this scenario with a default adapter and viewholder works properly.
Any ideas on how I could fix this?
Are you using hasFixedSize in the RecyclerView? That sounds like the behavior you are seeing
No, I explicitly set hasFixedSize to false via databinding
Is there any update on this, I've the same issue in which some of the views will be hidden based on logic, and the recycler view is not recalculated and is shown an extra bottom space.