You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does the library support shared recycledViewPools ?
I have a tablayout with FragmentPagerAdapter and several tabs that each use the same FlexibleAdapter which consists of AbstractExpandableItem as items with AbstractFlexibleItem as subitems.
The ExpandableViewHolder toggles the expansion on item click:
Since the ViewHolders in each tab/adapter are the same, I decided to use a shared ViewPool for the RecyclerView that gets initialized in the parent fragment to reduce the calls to onCreateViewHolder().
Now I have the problem though, that sometimes when toggleExpansion() gets called, nothing happens at all. The item is not collapsed or expanded. I guess it's the case when the adapter uses a viewholder from another tab because without the recycledViewPool, everything is working fine.
The text was updated successfully, but these errors were encountered:
venjirai
changed the title
Shared RecycledViewPool not suppored for expandable items?
Shared RecycledViewPool not supported for expandable items?
Dec 11, 2019
Does the library support shared recycledViewPools ?
I have a tablayout with FragmentPagerAdapter and several tabs that each use the same FlexibleAdapter which consists of AbstractExpandableItem as items with AbstractFlexibleItem as subitems.
The ExpandableViewHolder toggles the expansion on item click:
which works without problems.
Since the ViewHolders in each tab/adapter are the same, I decided to use a shared ViewPool for the RecyclerView that gets initialized in the parent fragment to reduce the calls to onCreateViewHolder().
Now I have the problem though, that sometimes when toggleExpansion() gets called, nothing happens at all. The item is not collapsed or expanded. I guess it's the case when the adapter uses a viewholder from another tab because without the recycledViewPool, everything is working fine.
The text was updated successfully, but these errors were encountered: