我想用5個按鈕將動畫添加到我的活動中。當我點擊任何按鈕時,它會消失。但是,當我點擊另一個按鈕時,它也會下降,但我點擊的第一個按鈕也會重新出現並且會下降。當我點擊另一個按鈕時,我想要點擊的按鈕不可見。以下是代碼片段:按鈕翻譯動畫不能按預期工作
animation = new TranslateAnimation(0,0,0,1000);
animation.setDuration(1000);
animation.setFillAfter(true);
然後在我的onclick:
button1.startAnimation(animation);
option1.setVisibility(0);
當我使用VIEW.Gone。佈局變得搞砸了。