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

StickyHeaderView empty list on Scroll error #3

Open
ghost opened this issue Apr 4, 2017 · 6 comments
Open

StickyHeaderView empty list on Scroll error #3

ghost opened this issue Apr 4, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Apr 4, 2017

Process: uz.iutlab.jiznstudenta, PID: 28326
java.lang.IllegalArgumentException: maxSize <= 0
at android.util.LruCache.(LruCache.java:82)
at tellh.com.stickyheaderview_rv.StickyHeaderView$1.onScrollStateChanged(StickyHeaderView.java:72)
at android.support.v7.widget.RecyclerView.dispatchOnScrollStateChanged(RecyclerView.java:4609)
at android.support.v7.widget.RecyclerView.setScrollState(RecyclerView.java:1371)
at android.support.v7.widget.RecyclerView.onTouchEvent(RecyclerView.java:2829)
at android.view.View.dispatchTouchEvent(View.java:10013)

When StickyHeaderView is empty it gives exception

@aaronr0207
Copy link

I'm gettin the same error. It's reproducible adding one item and touching the empty zone too

@TellH
Copy link
Owner

TellH commented Apr 21, 2017

@BeMyHeart @aaronr0207 Can you show me your code? Sorry for delay.

@aaronr0207
Copy link

aaronr0207 commented Apr 21, 2017

Yes, tell me if it is enought. Didn't include the view cause isn't relevant I though.

My recycler items model
https://gist.github.com/aaronr0207/a0d7eb1de98f653abd1f36ab4b50b654

Recycler list item (non header)
https://gist.github.com/aaronr0207/fd3d0b895215c839e560902356297e1e

Recycler header item
https://gist.github.com/aaronr0207/0d058402f959822862afdcef8f7fd844

Initialization + Populate list
https://gist.github.com/aaronr0207/8522357a97b15954bf5380ec6c9ee07b

@TellH
Copy link
Owner

TellH commented Apr 21, 2017

        List<DataBean> userList = new ArrayList<>();
        userList = ListafincasDatabean();
        adapter_sticky = new StickyHeaderViewAdapter(userList)
                .RegisterItemType(new FincaRecyclerItemViewBinder(this.getBaseContext()))
                .RegisterItemType(new HeaderRecyclerItemViewBinder(this.getBaseContext()));
        rv_sticky.setAdapter(adapter_sticky);

@aaronr0207 What the userList contains here.

@ghost
Copy link
Author

ghost commented Apr 22, 2017

UserList contains my models sticky view and subTexts

@aaronr0207
Copy link

aaronr0207 commented Apr 26, 2017

@TellH Header items and regular items, as DataBean models:

https://gist.github.com/aaronr0207/a0d7eb1de98f653abd1f36ab4b50b654
https://gist.github.com/aaronr0207/0d058402f959822862afdcef8f7fd844

Didn't see the notification, sorry

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