So, if the views should not be redrawn during the animation, you can enable the hardware levels during the animation. For instance:
final View myView =
Animator animator = ObjectAnimator.ofFloat(myView, View.ALPHA, 0f, 1f);
animator.setDuration(1000);
animator.addAnimatorListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animator) {
myView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
}
@Override
public void onAnimationCancel(Animator animator) {
myView.setLayerType(View.LAYER_TYPE_NONE, null);
}
@Override
public void onAnimationEnd(Animator animator) {
myView.post(new Runnable() {
@Override
public void run() {
myView.setLayerType(View.LAYER_TYPE_NONE, null);
}
}
}
}
animator.start();
, , , ( , , , , ), .
onAnimationEnd , 4.0.x, none onAnimationEnd. 4.1 , .
. , , , , , .