There is really no built-in way to do this. TransitionDrawable does not have an endless loop animation function. The simplest recommendation would be to use Animation (alpha, scale, translation, etc.) on a View containing only one of your Drawable , if you can.
Pretty easy to hack would be to add a Handler and callback to your custom View holding your TransitionDrawable . When a View is created, the Handler can be set to your transition interval. View also implements Handler.Callback and inside its handleMessage(Message) method, it will call reverseTransition(int) on your TransitionDrawable .
The following is an example:
public class myView extends View implements Handler.Callback { private Handler mHandler = new Handler(this); private int mDelay = 1000;
Call start() to start the continuous transition, stop() to stop it. This is a bit like creating your own animation, but it works as a last resort.
source share