Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapter的BUG #10

Open
yangkile opened this issue Feb 17, 2017 · 2 comments
Open

adapter的BUG #10

yangkile opened this issue Feb 17, 2017 · 2 comments

Comments

@yangkile
Copy link

yangkile commented Feb 17, 2017

image

在XrecyclerbView里面setadapter 方法中,有个adapter类型判断,判断属于不属于XRecyclerAdapter,
然而 adapter都是继承自你封装的RecyclerAdapter,所以一定是不属于XRecyclerAdapter,每次setAdapter都生成新的XrecyclerAdapter 也将header 和footer重置为了null

造成适配多个数据源情况下,一旦调用了setAdaper都得重新add header,应该是个BUG。望解决!= =

@yangkile
Copy link
Author

image
在修改成这样后暂时解决,不太确定这种修改能不能行,希望指导下

为了解决重新设置adapter时 header 和footer消失的问题

@limedroid
Copy link
Owner

这种解决方案是可行的,当初我的设计是先setAdapter,然后才能进行header & footer的操作。 @yangkile

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

No branches or pull requests

2 participants