I am trying to set the StartButton alpha to 0 before the delay, for some reason is goes invisible after the sleep.
private void playNextGame(){
Log.i("Info", "Start button tapped");
StartButton.setAlpha(0);
StartButton.setClickable(false);
Long delay = Math.round((Math.random()*((7000-3000)+1))+3000);
try {
sleep(1000);
}catch (InterruptedException e){
Log.w("warning", e);
}
FirstButton.setBackgroundColor(Color.GREEN);
SecondButton.setBackgroundColor(Color.GREEN);
FirstButton.setClickable(true);
SecondButton.setClickable(true);
}
Can someone help me to get the StartButton alpha to 0 before the sleep function is called?