Comments (9)
Thanks for the reports, will be fixed and covered in test in the next release.
from oneadapter.
Also I checked for #37 issue.
There is no crash now in 2.1.0, but it is possible to achieve that after a certain amount of quick removal of all items and adding them back, the setItems method just stops working - the adapter remains empty, even if you pass some objects there.
Upd: If we call layoutManager.scrollToPositionWithOffset(position, 0) on broken empty adapter, then elements appear - probably this information can help in debug problem.
from oneadapter.
I've tried to simulate the behavior you mention:
- with multiple search views, simple and complex
- with manual and simulated monkey testing (random input to an edit text with random pace)
- with and without multiple item modules
- with and without emptiness module
I could not reach an invalid state.
can you share the simplest project you can that this behavior is reproducible?
from oneadapter.
Spent almost an hour to be able to strongly reproduce bug, but I did it))
I send you a video for reproducing steps and sample project later.
from oneadapter.
https://github.com/vellrya/OneAdapter_Issue
Watch reproduce.mp4 video, bug appeared at ~0:40
Seems like this happened after we call setItems on empty adapter (when search substring reduced) after fast changing it's data
from oneadapter.
Thanks for the help.
I'm still trying to figure this behavior out - if it's my library or the extended Android adapter bug, and how to work around it.
from oneadapter.
Now I switched to ListAdapter for this particular RecyclerView and cannot reproduce this error more.
But of course I had to write a lot of boilerplate code and there is no support for pagination and a lot of other features of your library)
Also, it seemed to me that with ListAdapter the work of RecyclerView became smoother, could this be?
from oneadapter.
Honestly, ListAdapter is implemented by using AsyncListDiffer, which OneAdapter uses as well.
The implementations are basically identical, but as you said with fewer features, hence maybe there is a slim benefit to the "Valina" version.
This is why this bug is so weird and even more, if it does not reproduce on ListAdapter.
The entire state of the adapter is correct and keeps updating but the recycler seems disconnected from it.
Will keep investigating...
from oneadapter.
The original issue has been fixed on v2.1.1
from oneadapter.
Related Issues (20)
- Support for StateRestorationPolicy HOT 4
- Scroll to first added element HOT 7
- Random crash in onCreate HOT 3
- use setItem, but the onBind method not be invoke HOT 12
- Question:Paging with Room Datasource HOT 2
- IndexOutOfBoundsException: Inconsistency detected HOT 2
- Add drag & drop support
- Multiple ViewType HOT 9
- Can we call next page with Paging Module to load without scrolling HOT 5
- Preselected Items HOT 1
- Load more animation when submit empty list HOT 1
- It not a function to get the data from adapter. HOT 1
- Retry button HOT 2
- View Binding with Kotlin 1.6.0 not working HOT 5
- How do i filter the list ?
- You can't use interface as M : Diffable in intem module HOT 1
- select all
- Dynamic layout manager
- Multiple Selection Cancellation Issue When Item Is Not Visible
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 oneadapter.