I dont know where to put the intent in a progressbar
<p>here's my java code i've just search on the net. I dont know how i could put and intent in a progressbar so that it could change layout after it loads...if you could help me it would be great...thanks...</p>

<pre><code>public class Support extends Activity {
private static int progress;
private ProgressBar progressBar;
private int progressStatus = 0;
private Handler handler = new Handler();


public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.support);

    progress = 0;
    progressBar = (ProgressBar) findViewById(R.id.progressBar);
    progressBar.setMax(400);

    while(progressStatus &lt; 100)
    {
        progressStatus = doSomeWork();
        handler.post(new Runnable()
        {
            public void run(){
                progressBar.setProgress(progressStatus);

            }
        });

    }
    handler.post(new Runnable()
    {
        public void run()
        {
            progressBar.setVisibility(0);
        }
    });
</code></pre>

<p>}</p>

<pre><code>private int doSomeWork() {
    try{
        Thread.sleep(50);
}       
catch(InterruptedException e)
{
    e.printStackTrace();

}
    return ++progress;
}
</code></pre>

<p>}</p>
