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

SubAdapter notifyItemMoved/notifyItemRemoved #1

Closed
OakOnEll opened this issue Dec 7, 2015 · 2 comments
Closed

SubAdapter notifyItemMoved/notifyItemRemoved #1

OakOnEll opened this issue Dec 7, 2015 · 2 comments

Comments

@OakOnEll
Copy link

OakOnEll commented Dec 7, 2015

I am having trouble implementing calls to notifyItemRemoved/notifyItemMoved from within my subadapter methods, because these methods would appear to take the outer mergeAdapter position, while the adapter would have its local position.

There is a method getMergePositionForLocalPosition on RecyclerViewMergeAdapter which looks like it would be helpful, but it is currently a private method.
Would it make sense for the subAdapter class to override the notify methods and perform the subadapterPosition->mergePosition before delegating upwards, or perhaps new methods notifySubItemRemoved,etc.?

@NammariMarkavip
Copy link

+1

@xingstarx
Copy link

Afater my test, I call subAdapter.notifyItemRemoved or notifyItemMoved, the Recyclerview display Normal

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

4 participants