I develop a widget based on ViewGroup
and my problem is that I need to save position of items after the end of animation. I called setFillAfter(true)
i
You must use ObjectAnimator
, it works from API 11 level . It changes View position automatic,
here is the example
ObjectAnimator objectAnimator= ObjectAnimator.ofFloat(mContent_container, "translationX", startX, endX);
objectAnimator.setDuration(1000);
objectAnimator.start();
Thanks JUL for his answer
If your app not found object animator
, change the API level from Project -> properties -> Android
, than import android.animation.ObjectAnimator;