fillAfter and fillEnabled not working in Android view animation XML

It also works if you don't have the set tag and are just doing translate or something like so.

<translate xmlns:android="http://schemas.android.com/apk/res/android"       
    android:interpolator="@android:anim/linear_interpolator"       
    android:fromXDelta="0"
    android:toXDelta="0"
    android:fromYDelta="1000"
    android:toYDelta="-300" 
    android:startOffset="100"
    android:duration="1000"
    android:fillAfter="true" />

I had the same problem, this worked for me:

<set
    android:fillEnabled="true"
    android:fillAfter="true"
    xmlns:android="http://schemas.android.com/apk/res/android">

    <translate
        android:fromYDelta="0"
        android:toYDelta="-20%p"
        android:duration="7000" />

</set>

Put the attributes fillEnabled and fillAfter in the Set tag.