title: Android: How to call certain method after certain time?
body: <p>I am a newbie to Android App Development. I want to call a certain method after certain time and I am unable to do that. The methods I have tried include the postDelayed method.</p>
  
  <p>Here is the code I want to execute after 2000ms</p>
  
  <pre><code>private void computersTurn() {
      rollButton.setEnabled(false);
      holdButton.setEnabled(false);
      while (currentTurn=='C' &amp;&amp; cTurn&lt;=20 &amp;&amp; cTotal&lt;=100) {
          rollDice();//TO BE EXECUTED AFTER INTERVALS
      }
      hold();
      rollButton.setEnabled(true);
      holdButton.setEnabled(true);
  }
  </code></pre>
  
  <p>The code for whole activity can be found here: <a href="http://pastebin.com/bzkfydpL" rel="nofollow">http://pastebin.com/bzkfydpL</a></p>