title: Android change edittext background
body: <p>I have an EditText (et) and a button (bt). When I press bt, et should change the background color to green, and after 1 second return white.
  My code is something like this:</p>
  
  <pre><code>    bt.setOnClickListener(new Button.OnClickListener(){
          @Override
          public void onClick(View view){
              answer.setBackgroundColor(Color.parseColor("#00FF00"));
              try{
                  Thread.sleep(1000);
              }catch(InterruptedException e){}
              answer.setBackgroundColor(Color.parseColor("#FFFFFF"));
          }
      });
  </code></pre>
  
  <p>The problem that I noticed is that the color of et changes only when the code is completely executed, not when the method is called! In other words, et is always white, because the change to green never happens.
  Is there an alternative to that code? Thank you very much in advance.</p>