I am using AnimationSet to execute a TranslateAnimations sequence.
icon = (ImageView)findViewById(R.id.icon); AnimationSet animationSet = new AnimationSet(true); animationSet.setInterpolator(new AccelerateInterpolator()); TranslateAnimation slide1 = new TranslateAnimation(0, 50, 0, 100); slide1.setStartOffset(0); slide1.setDuration(800); animationSet.addAnimation(slide1); TranslateAnimation slide2 = new TranslateAnimation(50, 100, 100, -100); slide2.setStartOffset(1000); slide2.setDuration(800); animationSet.addAnimation(slide2); .... animationSet.setFillAfter(true); icon.startAnimation(animationSet);
My problem is that the animation is very jerky. The first animation happens very abruptly, then the second begins. How can I make it smooth and even?
source share