title: How do you pause code in android studio?
body: <p>I want to be able to change the background color of a button when pressed, then change it back half a second later. I have tried many things, but for some reason, most don't work.</p>
  
  <p>For example, Thread.sleep(500); gives me an error, SystemClock.sleep(500); pauses the UI, and for some reason I cannot make a handler using Handler mHandler = new Hander(); No solution that I have found has worked so far.</p>