I have 2 tables, Table-A and Table-B. The Table-B is below Table-A and I am using RelativeLayout.
I set the animation for the Table-A to slide up as follows.
TranslateAnimation slide = new TranslateAnimation(0, 0, 0, -(Table-A Height));
slide.setDuration(500);
slide.setFillAfter(true);
slide.setFillEnabled(true);
slide.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationEnd(Animation animation) {
Table-A.setVisibility(View.GONE);
}
});
Table-A.startAnimation(slide);
The Table-A slides perfectly, but Table-B does not move until the Table-A animation is over and Table-B jumps to the top once the animation is completed. This does not look good as user sees Table-B jumping to the top.
Removing setAnimationListener and adding Table-A.setVisibility(View.GONE); at the bottom will also produce the same result.
Am I doing something wrong? Please help. Thanks in advance.
I set the animation for the Table-A to slide up as follows.
TranslateAnimation slide = new TranslateAnimation(0, 0, 0, -(Table-A Height));
slide.setDuration(500);
slide.setFillAfter(true);
slide.setFillEnabled(true);
slide.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationEnd(Animation animation) {
Table-A.setVisibility(View.GONE);
}
});
Table-A.startAnimation(slide);
The Table-A slides perfectly, but Table-B does not move until the Table-A animation is over and Table-B jumps to the top once the animation is completed. This does not look good as user sees Table-B jumping to the top.
Removing setAnimationListener and adding Table-A.setVisibility(View.GONE); at the bottom will also produce the same result.
Am I doing something wrong? Please help. Thanks in advance.
