Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Non view.getType() solution for ViewPool #81

Open
ypresto opened this issue Apr 6, 2015 · 0 comments
Open

Non view.getType() solution for ViewPool #81

ypresto opened this issue Apr 6, 2015 · 0 comments

Comments

@ypresto
Copy link
Contributor

ypresto commented Apr 6, 2015

Currently ViewPool uses view.getClass() so all root views should have different classes.
This does not good if you want to use view types with same layout, like RelativeLayout.

I found it silently does not reuse view if no matching type is registered.
https://github.com/Comcast/FreeFlow/blob/master/FreeFlow/src/com/comcast/freeflow/core/ViewPool.java#L38
This caused performance issue on our app for long time...

I think it is more convenient if it has interface similar to ListAdapter#getItemViewType(int).
SectionedAdapter#getItemViewType(FreeFlowItem) or view.getTag(FREE_FLOW_VIEW_TYPE) is also convenient.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant