I can use the xml file as below
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator">
<translate android:fromXDelta="100%" android:toXDelta="0%" android:duration="500" />
</set>
and download this xml from code like AnimationUtils.loadAnimation (mContext, com ..... R.anim.slidein)
everything works perfectly
But now for some reason I need to do the same without using XML, how to create the same animation using only code, I tried something like this
TranslateAnimation in = new TranslateAnimation (1.0f, 0.0f, 0.0f, 0.0f);
in.setInterpolator (AnimationUtils.loadInterpolator (mContext,
android.R.anim.accelerate_interpolator));
in.setDuration (500);
but it doesnβt work, nothing revives
I think the problem is related to percentages, in xml I specified percentages, but in the TranslateAnimation constructor, how to specify percentages
Monty