Hello
I've been having some difficulties with  the progress bar. I built a
separate test harness and now I start to see things more clearly. The
code below seems to work correctly, but updates the progress bar only
when it finishes. I want it to update as the progress is made!

package com.example.progressbartest;
<snip imports>

public class ProgressBarTest extends Activity {
        static int i;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Request the progress bar to be shown in the title
        requestWindowFeature(Window.FEATURE_PROGRESS);
        setContentView(R.layout.main);
        setProgressBarVisibility(true);

        final ProgressBar progressHorizontal = (ProgressBar)
findViewById(R.id.progress_horizontal);
        while (i<1000){
                setProgress(i++);
                Log.e("John","in loop"+Integer.toString(i));
              }
    }
   }

There are actually two progress bars, like in the API demo app. One in
the title bar and another in the main screen. One would be sufficient,
but I don't know (yet) how to get rid of just one!

John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to