I have 2 animations which are already working, i want to fade my train + tween my train on the same time. If I execute 1 of these lines it works. But if I try to execute both it
Can be done programatically using AnimatorSet class of android :
final AnimatorSet mAnimatorSet = new AnimatorSet();
mAnimatorSet.playTogether(
ObjectAnimator.ofFloat(img_view,"scaleX",1,0.9f,0.9f,1.1f,1.1f,1),
ObjectAnimator.ofFloat(img_view,"scaleY",1,0.9f,0.9f,1.1f,1.1f,1),
ObjectAnimator.ofFloat(img_view,"rotation",0 ,-3 , -3, 3, -3, 3, -3,3,-3,3,-3,0)
);
//define any animation you want,like above
mAnimatorSet.setDuration(2000); //set duration for animations
mAnimatorSet.start();
this example will start all the 3 animation on the target view(imgView) at same time ,you can also use playSequentially .....
For complete example check this out..