How to pause/delay on  Android?
<p>I am currently learning how to develop applications for Android mobile devices.</p>

<p>I wrote a test application to display numbers 0-9 on the device screen. I created a simple function to delay the number change.</p>

<p>However, upon running the application, only the final number is displayed. There is also a delay before this final number shows. I'm assuming that the length of the pause is my defined delay multiplied by the number of digits to be shown.</p>

<p>How do I create an app that changes the numbers with a delay?</p>

<pre><code>public class AndroidProjectActivity extends Activity {
    public void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        Main();
    }

void Delay(int Seconds){
    long Time = 0;
    Time = System.currentTimeMillis();
    while(System.currentTimeMillis() &lt; Time+(Seconds*1000));
}

void Main() {
    String ConvertedInt;
    TextView tv = new TextView(this);
    setContentView(tv);

    for(int NewInt = 0; NewInt!= 9; NewInt++){
        ConvertedInt = Character.toString((char)(NewInt+48));
        tv.setText(ConvertedInt);
        Delay(5);
    }
}
</code></pre>
