I am trying to make a dice app when a button is clicked a "rolling" image displays for a set amount of time and then switches to dice result. My code just skips the rolling image and waits for the sleep time on whatever the previous result was and then immediately changes to the new result. Any idea what's wrong?
public void on click(View arg0)
{
image.setImageResource(R.drawable.dice_rolling);
try{
Thread.sleep(1500);
} catch (InterruptedException e) {
e.printStackTrace();
}
image.setImageResource(R.drawable.dice_result);