Decrease jank in all apps physics.
By creating the spring in onCreateViewHolder and adding in onBindViewHolder, we are able to take advantage of RecyclerView's prefetching optimizations. Bug: 38349031 Change-Id: Ie445039fd90ca92ae4ce1ff71c57b15f662377a8
This commit is contained in:
1 parent
9b9beae02e
commit
9d7f2b9e0d
2 files changed
+32
-18
No files matched your search
@@ -178,7 +178,7 @@ public class SpringAnimationHandler {
|
||||
return mDirection == Y_DIRECTION;
|
||||
}
|
||||
|
||||
private SpringAnimation createSpringAnimation(View view) {
|
||||
public SpringAnimation createSpringAnimation(View view) {
|
||||
DynamicAnimation.ViewProperty property = isVerticalDirection()
|
||||
? DynamicAnimation.TRANSLATION_Y
|
||||
: DynamicAnimation.TRANSLATION_X;
|
||||
|
||||
Reference in new issue
Block a user