我无法理解这个 java 代码。我希望图像闪烁几次,但有一些延迟。图像闪烁一次,仅此而已。谁能给我一个解释会很棒!
private void RunAnimations(int[]melodiTakten) {
for (int i = 0; i < 4; i++) {
ImageView markeringspilen = (ImageView) findViewById(R.id.markeringspil);
markeringspilen.setVisibility(View.VISIBLE);
markeringspilen.postDelayed(new Runnable() {
public void run() {
ImageView markeringspilen = (ImageView) findViewById(R.id.markeringspil);
markeringspilen.setVisibility(View.INVISIBLE);
}
}, 2000);
}