I wanted to add animation to my activity with 5 buttons. When I click on any button, it disappears going down. However, when I click on another button, it goes down as well but the first button I clicked also reappears and goes down. I want the buttons clicked to not be visible when I click on another button. Here is the code snippet:
animation = new TranslateAnimation(0,0,0,1000);
animation.setDuration(1000);
animation.setFillAfter(true);
Then on my Onclick:
button1.startAnimation(animation);
option1.setVisibility(0);
When I use VIEW.Gone. The layout becomes messed up..
Try to use Invisible instead of gone. View.GONE will release occupied space by this view causing your layout issues. Invisible will hide your view but won’t change the position of any other views.