I am trying to apply multiple-animation for multiple image views at the same time. Below is the code snippet.
final AnimatorSet animationSet = new AnimatorSet();
for(int i=0;i<frame.getChildCount();i++){
final ImageView vw = (ImageView) frame.getChildAt(i);
animationSet.playTogether(
ObjectAnimator.ofFloat(vw, "rotationY", 60),
ObjectAnimator.ofFloat(vw, "scaleY", 0.8f),
ObjectAnimator.ofFloat(vw, "x", 0)
);
animationSet.setDuration(600);
animationSet.setInterpolator(new DecelerateInterpolator(1.5f));
animationSet.start();
this is applied to every item while swiping.
When i swipe on the screen images will animate. This animation is very slow when the image count increases. I have tried providing below
1.Adding Layer type and setting null while animation ended
2.Tried Setting hardwareaccelerated aattribute in Manifest
3.Tried setting large heap attribute in manifest
4.Added animation cache for items.
5.Tried running with high RAM devices.
is there any option to improve animation performance or any alternatives in android.?
Thanks in advance.