I have written my own custom interpolator class .
@Override
public float getInterpolation(float t) {
return t*t*t;
}
I am doing Fragment slide in and slide out animation .There I want to give the reference of this interpolator class in the xml.
But In the xml I am only able to add android provided interpolators.
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://ift.tt/nIICcg">
<translate
android:fromXDelta="594"
android:startOffset="0"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:toXDelta="0"
android:fillAfter="true"
android:duration="400"/>
</set>
So basically I wanted to know how to give reference of Custom Interpolator class in Xml.
Aucun commentaire:
Enregistrer un commentaire