Closed hubcin closed 7 years ago
I think you would have to remove the first line in function onAdapterChanged()
, because when setAdapter
of the RecyclerView
called, the data observer is already registered.
Didn't figure out why you explicitly registered it again, so if registering it is necessary in some circumstances, I think you may have to check if the data observer is registered or not before that.
Yes, this issue goes into more deeper problem, coz in case changing adapters - measurer will listen for both of them with current implementation, which is really incorrect. Thanks again for nice feedback
fixed in v0.3.5. Covered with functional test
Yeah, it's perfectly done. Had to clean the project and rebuild it after changing to the newer version. Thanks for your efforts.
np
java.lang.IllegalStateException: Observer com.beloo.widget.chipslayoutmanager.layouter.MeasureSupporter@6c0f5aa is already registered.
When I call
setAdapter
the second time for my RecyclerView which has ChipsLayoutManager, it will give me this error.