Skip to content

Instantly share code, notes, and snippets.

@amanjeetsingh150
Last active August 28, 2019 11:27
Show Gist options
  • Save amanjeetsingh150/57a50926c1c94fabaefb41a102c2eb13 to your computer and use it in GitHub Desktop.
Save amanjeetsingh150/57a50926c1c94fabaefb41a102c2eb13 to your computer and use it in GitHub Desktop.
handler.postDelayed(new Runnable() {
@Override
public void run() {
if (index < polyLineList.size() - 1) {
index++;
next = index + 1;
}
if (index < polyLineList.size() - 1) {
startPosition = polyLineList.get(index);
endPosition = polyLineList.get(next);
}
//CODE
ValueAnimator valueAnimator = ValueAnimator.ofFloat(0, 1);
valueAnimator.setDuration(3000);
valueAnimator.setInterpolator(new LinearInterpolator());
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
//CODE
});
}, 3000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment