I use TransitionDrawable to display a set of images with a transition between . With code in my activity:
TransitionDrawable simons; simons=(TransitionDrawable)getResources().getDrawable(R.drawable.rocket_thrust); simons.startTransition(2000); frame.setImageDrawable(simons);
And with the xml file in the res / drawable folder containing three images
<?xml version="1.0" encoding="utf-8"?> <transition xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/simon" android:duration="500" /> <item android:drawable="@drawable/simons" android:duration="500" /> <item android:drawable="@drawable/chipmubnks" android:duration="500" /> </transition>
The problem I am facing is only the first two images with a transition between them, the third image is not displayed . Am I missing something here?
source share