Is there a simple way to repeat a Android AnimatorSet
(infinite)? Can I set a AnimationListener
and restart the AnimatorSet
by calling
So, none of the above options are appropriate.
If you use:
@Override
public void onAnimationEnd(Animator animation) {
if (!mCanceled) {
animation.start();
}
}
you will end up getting stackOverFlow exception sometimes.
The best thing is to do something like:
Thread t = new Thread(new Runnable() {
@Override
public void run() {
while (true && getActivity() != null) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
set3.start();
}
});
SystemClock.sleep(1200);
}
}
});
t.start();