Open semso-bonaparta opened 4 years ago
Perhaps this is related to #1032
maybe you need to rebuild models, and are not properly clearing models when the fragment view is destroyed?
maybe you need to rebuild models, and are not properly clearing models when the fragment view is destroyed?
The fragment is being destroyed and recreated, so the model is being rebuild every time
Hi,
I have a epoxy recyclerview within a fragment. When the fragment is setup for the first time everything works as expected. When i pop back from that fragment and show it again at some time later, the click events from the epoxy recyclerview get executed on the previously "destroyed" fragment. When I check the "activity" property inside the click event it is "null", but it surely is not, because when I click on a regular button (outside of the recyclerview) i get the propper reference of the activity. Obviously the recyclerview keeps the reference of the old fragment, and I didnt find a way to get it removed.
Is there a way to completly remove the fragment reference from recyclerview?
Edit: Tried these things but it didnt work: binding.epoxyrecyclerviewChooseicon.recycledViewPool.clear() binding.epoxyrecyclerviewChooseicon.adapter = null binding.epoxyrecyclerviewChooseicon.clear() binding.epoxyrecyclerviewChooseicon.invalidate()