Can there be more than 2 items in transition drawable? I need to change background so second frames fades in than on top of it third does and so on to fourth...
for now I have this:
<?xml version="1.0" encoding="UTF-8"?>
<transition xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/voting_button_not1"/>
<item android:drawable="@drawable/voting_button_not2"/>
<item android:drawable="@drawable/voting_button_not3"/>
<item android:drawable="@drawable/voting_button_not4"/>
<item android:drawable="@drawable/voting_button_not5"/>
<item android:drawable="@drawable/voting_button_not1"/>
</transition>
And I got the button:
<ImageButton android:id="@+id/skipButton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/coldf1f2"
android:scaleType="fitCenter"
android:adjustViewBounds="true"/>
P.S. never mind that its an ImageButton, that doesn't make any difference.
And in my code I got smth like this:
TransitionDrawable vote_not = (TransitionDrawable)skip.getBackground();
vote_not.startTransition(1000);
It plays transition from first item to second. But I need the full list be played.