Comments (1)
I also encountered this and wanted to share my solve just in case someone else comes across this issue.
ItemAnimator.recordPreLayoutInformation is called before RecyclerView.Adapter.onBindViewHolder and ItemAnimator.recordPreLayoutInformation after. To avoid rebinding the data and triggering request layout I flagged my ViewHolder to store the content data but not bind it to the views, I set a flag on the viewHolder in recordPreLayoutInformation and clear it when the first animation in the series started by animateChange is started (AnimatorListenerAdapter.onAnimationStart).
I encapsulate binding data to view in a method on my viewholder like bindTo(content: Content)
and modified this method to check if the flag was set before setting the viewHolder's views
// ViewHolder snippet, Kotlin
var content: ContentType? = null
var isChangeAnimationScheduled = false
fun bindTo(newContent: ContentType) {
content = newContent
if(isChangeAnimationScheduled) return
// Bind Content to views here
}
from instamaterial.
Related Issues (20)
- Crash at Camera Preview HOT 1
- Please don't tell me this is dead :(
- how to make eidtText move with soft keyboard
- Failed to resolve:com.commonsware.cwac:camera:0.7+ HOT 1
- Error: Suspicious namespace and prefix combination [NamespaceTypo] HOT 1
- Currently developing the app asking about upload image or json data from web? HOT 5
- I could not see any videos
- Application link
- Preview mode must have started before you can take a picture
- on Able to detect Header expand and collapse
- news?
- Crash at TakePhotoActivity
- F-Droid
- How do you eliminate the app name in your toolbar? HOT 1
- Bug in InstaMaterial App: my feed, news, setting, and all features not working #44
- Adding important guideline documents
- Updated documentation HOT 2
- Add a private constructor in the Utils class to hide the implicit public one. HOT 1
- Refactor this method to not always return the same value
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 instamaterial.