I am trying to fade in the markers on a google maps fragment like this:
ValueAnimator animator = ValueAnimator.ofFloat(0, 1);
animator.setDuration(1000);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
marker.setAlpha((float) animation.getAnimatedValue());
}
});
animator.start();
It works perfectly for a single marker but when I try to do it with 200 markers the performance is terrible and the markers just appear without any animation. I'm going nuts here, any help/idea/suggestion would be really appreciated.