I am trying to add an animation to my app that will hide or show a menu on single tap. Basically something similar to Pulse news readers article view. I am able to animate the menu container. However,the menu does not slide down at the same time as the main container is creating space for the menu holder. I would like to know how to fix this issue.
Here is my animation code:
if(homeTabBar.getVisibility() == View.GONE){
homeTabBar.setVisibility(View.VISIBLE);
final Animation tabBlockHolderAnimation = AnimationUtils.loadAnimation(ArticleActivity.this, R.anim.tab_down);
tabBlockHolderAnimation.setFillAfter(true);
homeTabBar.startAnimation(tabBlockHolderAnimation);
}else{
final Animation tabBlockHolderAnimation = AnimationUtils.loadAnimation(ArticleActivity.this, R.anim.tab_up);
tabBlockHolderAnimation.setAnimationListener(new AnimationListener(){
@Override
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub
homeTabBar.setVisibility(View.GONE);
}
});
tabBlockHolderAnimation.setFillAfter(true);
homeTabBar.startAnimation(tabBlockHolderAnimation);