奇妙な問題があります。コントロール(ImageButton)をフェードアウトするはずのアニメーションがすぐに開始されないことがあります。フェードアウトアニメーションを使用して非表示にし、最後のmyListener(onAnimationEnd)で、ボタンの画像として新しいリソースを配置します。
私のアプリコードのどこか:
Animation a = AnimationUtils.loadAnimation(this,R.anim.fadeout);
a.setAnimationListener(new myListener(location));
buttons[location].setAnimation(a);
a.startNow(); // regardless if its start() or startnNow()
// it will work in most of the cases but not 100% reliable
// I actually can see in debug Log when its late, happens after few more clicks
次に、myListener.onAnimationEnd(Animation a)で:
buttons[location].setImageResource(R.drawable.standard_button);
4番目または5番目ごとのアニメーションが開始されないというルールがあるようです...
手伝ってくれてありがとう!