Comments (4)
i check somethings and i can confirm that the notifyItemRemoved is not "reordering" the things like the remove, i mean, when you mDataSet.remove() it already update the list, but the notifyItemRemoved doesnt know that, so when you click to remove again, i will try to remove position X, but the .remove() already changed that position o0
from recyclerview-animators.
I think this question should not be asked for this library, since the removal of an item is part of RecyclerView.Adapter
. For the resolution of your problem you should better have a look at my adapter, see my repository.
from recyclerview-animators.
I have come acrossed this problem, so how do you deal with it?
from recyclerview-animators.
@huangjim, it is strange indeed, probably it's because onBindViewHolder is called everytime you call notify and that final might lead to some weird behaviour. Try to implement the delete from the Activity, also you should better to not implement the click listener in that method since it is called every time a new row is bound. So, again have a look at my adapter.
from recyclerview-animators.
Related Issues (20)
- The FlipAnimator on Android-P may cause crashes.
- Blinking after changing item heigth
- Is there a way to animate in this way (video inside)?
- java
- Bug: App does not compile
- FlipInTopXAnimator crashes in Android Pie
- Deleting multiple (50+) items from recycler view is throwing exception (Stacktrace attached) HOT 1
- MultipleBuildFailures error: failed linking references.
- Animation not displaying with data already initialized. HOT 1
- Option to disable the start delay HOT 1
- Help converting to Java HOT 1
- Animation dose not worked HOT 1
- animation not worked properly when i put recyclerview inside nested scrollview HOT 1
- Remove Animation Is Applied To All Items Strange Behaviour HOT 1
- Default ItemAnimators don't use interpolator from constructor
- Add animations work; Remove animations are clunky HOT 2
- Java Settings The following code does not run
- Animator Crashing
- Smooth scroll to first Item befor start animation
- Readme broken link
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recyclerview-animators.