I'm trying to put in two alpha animations in one AnimationSet, as follows, but when I run it, the first (fadeout) animation happens, but it remains blank for the next animation. I understand that I can use a repeatMode="reverse"
to do this, but I would like to know why this is not working in case I want to do something more fancy. Thanks.
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<alpha
android:duration="1000"
android:fillAfter="false"
android:fromAlpha="1.0"
android:toAlpha="0.0" />
<alpha
android:duration="1000"
android:fillBefore="false"
android:fillEnabled="true"
android:fromAlpha="0.0"
android:startOffset="1000"
android:toAlpha="1.0" />
</set>
I came to this post following the same thought.And i have tested this one now. Unexpectedly its working perfect. Here goes my code.
The first one will set alpha to a higher value and its pulled low after some time using a second alpha. Make sure you add "repeatMode" as "reverse" , even though repeatcount is not set and no repeat happens. And the actual flow that happens is not reversing the first alpha , but switching to the second alpha for reverse operation .