vlayout icon indicating copy to clipboard operation
vlayout copied to clipboard

请问,姿势还是不对吗?

Open 0blivionU opened this issue 6 years ago • 2 comments

1 . hasConsistItemType已经设置为true; 2 . 每个DelegateAdapter的getItemViewType都返回不同的type; 3 . 也设置了每种类型复用池的大小 : viewPool.setMaxRecycledViews(type, max),setMaxRecycledViews与 getItemViewType的type也是一一对应了。

第一次滑动时有卡顿,之后顺畅,请问姿势还是不对吗?

0blivionU avatar Nov 13 '18 03:11 0blivionU

第一次卡顿可以先看看create里面view的初始化耗时

OblivioU [email protected] 于2018年11月13日周二 上午11:35写道:

1 . hasConsistItemType已经设置为true; 2 . 每个DelegateAdapter的getItemViewType都返回不同的type; 3 . 也设置了每种类型复用池的大小 : viewPool.setMaxRecycledViews(type, max),setMaxRecycledViews与 getItemViewType的type也是一一对应了。

第一次滑动时有卡顿,之后顺畅,请问姿势还是不对吗?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alibaba/vlayout/issues/407, or mute the thread https://github.com/notifications/unsubscribe-auth/AEJfmIb2IQSEuG4sNhGFXliKvq0s6OlSks5uuj31gaJpZM4Ya2Xt .

MikeAfc avatar Nov 16 '18 03:11 MikeAfc

DelegateAdapter adapter = new DelegateAdapter(layoutManager, false); 如果类型不同,设置第二个参数hasConsistItemType为false即可。

githubxiaoou avatar May 07 '20 09:05 githubxiaoou