ロードする必要がある 4 つの画像があります。1 つのアニメーションを再生し、500 ミリ秒待機し、別のアニメーションを再生し、500 ミリ秒待機するなどです。アニメーションが行うのは、アルファを 255 から 0 に変更してから 255 に戻すことだけです。4 つのすべての imageView でそのアニメーションが必要です。
私は現在2つの問題を抱えています。
1.) すべての画像が同時に再生されます。
2.) 次にメソッドが呼び出されたときに、アニメーションが機能しません。
public void computerLights()
{
ImageView green = (ImageView)findViewById(R.id.imgViewGreen);
ImageView red = (ImageView)findViewById(R.id.imgViewRed);
ImageView blue = (ImageView)findViewById(R.id.imgViewBlue);
ImageView yellow = (ImageView)findViewById(R.id.imgViewYellow);
AlphaAnimation transparency = new AlphaAnimation(1, 0);
transparency.setDuration(500);
transparency.start();
green.startAnimation(transparency);
red.startAnimation(transparency);
blue.startAnimation(transparency);
yellow.startAnimation(transparency);
}