I'm trying to create a simon says game so to let the user know which buttons to hit I decided I wanted to do something like upon a button click change background wait a second then change it back it doesn't work right though the button waits 1 second to click but the drawable doesn't change
What I have looks something like this
view.setBackgroundResource(R.drawable.black);
try {
TimeUnit.SECONDS.sleep(5);
} catch(InterruptedException ex) {
Thread.currentThread().interrupt();
}
view.setBackgroundResource(R.drawable.green);