It is necessary that immediately after clicking the text appeared, and in a second the execution would continue. In fact, everything goes wrong - the delay is triggered before the appearance of the inscription.
public void onClick(View v) { switch (v.getId()) { case 1: tvOutAns.setTextColor(colorGreen); tvOutAns.setText("правильно: " + answer); try { TimeUnit.MILLISECONDS.sleep(1000); } catch (Exception e) { } createTask(); break; } }