Hi i have a little Countdown Timer in my App which shows every second another Drawable.
public void onTick(long millisUntilFinished) {
if(millisUntilFinished <= 4000 && millisUntilFinished >= 3001 )
{
cdImage.setBackgroundResource(R.drawable.player1_countdown_3);
cdImage2.setBackgroundResource(R.drawable.player2_countdown_3);
}
else if(millisUntilFinished <= 3000 && millisUntilFinished >= 2001 )
{
cdImage.setBackgroundResource(R.drawable.player1_countdown_2);
cdImage2.setBackgroundResource(R.drawable.player2_countdown_2);
}
if (millisUntilFinished <= 2000 && millisUntilFinished >= 1000 )
{
cdImage.setBackgroundResource(R.drawable.player1_countdown_1);
cdImage2.setBackgroundResource(R.drawable.player2_countdown_1);
}
if (millisUntilFinished <= 999 && millisUntilFinished >= 0 )
{
cdImage.setBackgroundResource(R.drawable.player1_countdown_go);
cdImage2.setBackgroundResource(R.drawable.player2_countdown_go);
}
}
but i also have the files
player1_countdown_4.png
player1_countdown_5.png
player1_countdown_6.png
and it shows this files instead of the right ones in the Order: 6,5,4,go
Sometimes this is an Eclipse error. You should try to clean your project and see if it helps. “Project -> Clean”