ObjectAnimator how to reuse or continue animation with values

630 Views Asked by At

I am using ObjectAnimator to animate marker in google map but i want to reuse ObjectAnimator or continue the animation when new location is received i am using it like

 public void onLocationUpdate(LatLong latLng)
 {

    ObjectAnimator animator = 
             ObjectAnimator.ofObject(marker, property, typeEvaluator,latLng);
             animator.setDuration(1000);
             animator.setInterpolator(new LinearInterpolator());
             animator.setStartDelay(0);
             animator.start();
             animator.addListener(animatorEndListener);

  }

i am getting this method called at the interval of 1 second i want to animate to have it appear continuous or at least reuse ObjectAnimator in case animation is finished when new value come so that it don,t create always new object

0

There are 0 best solutions below