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

RemoveItemAt(int visiblePosition) error #12

Open
alextestsamsungedge opened this issue May 16, 2016 · 4 comments
Open

RemoveItemAt(int visiblePosition) error #12

alextestsamsungedge opened this issue May 16, 2016 · 4 comments
Labels

Comments

@alextestsamsungedge
Copy link

Items order change after removal.

@iori57
Copy link

iori57 commented Jun 27, 2016

@alextestsamsungedge Try using getAdapterPosition() to get the updated position instead of using the initial position provided in onBindViewHolder.

I have another problem though, if my header (Header A below) only has one item (Item 1 below), after removing Item 1 and call RemoveItemAt, Item 1 disappears but Header A will stay there, but the collapsing/expanding of Header A and B will no longer work (Tapping on Header B will try to expand/collapse Header A and nothing happens except the arrow will rotate 90 degrees). Any way to solve this? How to remove Header A when there are no more items under it?

Header A ▼
Item 1
Header B ▼
Item 2
Item 3

@grennis
Copy link
Owner

grennis commented Jun 29, 2016

@iori57 that's a bug. I will fix it when I can get to it.

@iori57
Copy link

iori57 commented Jun 29, 2016

Cool, thanks for the great library!

@grennis grennis added the bug label Aug 24, 2016
@deverhjj
Copy link

@alextestsamsungedge @iori57 @grennis hi,there,plz check my implemented lib, welcome pull request ,issues ,thanks!
https://github.com/HuaJianJiang/ExpandableRecyclerView

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

No branches or pull requests

4 participants