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 behavior when deleting entry in local db #145

Open
Stugglzzz opened this issue Apr 18, 2018 · 0 comments
Open

Adapter behavior when deleting entry in local db #145

Stugglzzz opened this issue Apr 18, 2018 · 0 comments

Comments

@Stugglzzz
Copy link

Stugglzzz commented Apr 18, 2018

Hi ,i'm having an issue when i'm trying to delete an entry in realm db , the adapter does get notified (with animation which is nice ) , but the adapter behavior changes afterwards , items orders is not longer
the same (positions messed up), as i try to select one item i get an out of range exception , i tried to attach a change listener to the adapter dataset and then notify the observable (recyclerview) , it does work but animation no longer shows ,(i suppose the built-in function already does it which makes sense ) so i 'm forced to call notifyDataSetChanged() on my adapter data to get it work ..., I tried to override the getItemId method and call the setHasStableIds(true) but it dosent fit as i'm having a String ID as a primary key in my model , i also overidded the getItem method in case , but still having the same issue , i used TransactionAsync aswell but still the same . I want to keep animation showing when i delete an item , hopefully someone has an idea how to solve it , i'm kind of stuck to be honest .

Thanks in advance for help .

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

No branches or pull requests

2 participants