I am trying the "slide" animation two view that are one on top of another (y exiss).
This is what I am doing:
TranslateAnimation precentageTranslateAnim = new TranslateAnimation(0, 0, shareBtnsHeight, 0);
precentageTranslateAnim.setDuration(TRANSLATE_ANIMATION_DURATION);
DecelerateInterpolator interpulator = new DecelerateInterpolator();
precentageTranslateAnim.setInterpolator(interpulator);
precentageLayout.setVisibility(View.VISIBLE);
precentageLayout.startAnimation(precentageTranslateAnim);
reactionsBtnsLayout.startAnimation(precentageTranslateAnim);
My problem is that when the animations happen, you can see that the views are not moving completely together.
There is a small line between them during the animation.
Is there a way to make synchronization between them?
Because you are starting animation at different moments, You need to run them parallelly, for your help lucky android has ability of clubbing different animation and option of running them parallely. Perform the following.
http://developer.android.com/reference/android/view/animation/AnimationSet.html
read above link for more detail. Code below