FileDocCategorySizeDatePackage
ProgressBar4.javaAPI DocAndroid 1.5 API1714Wed May 06 22:41:08 BST 2009com.example.android.apis.view

ProgressBar4

public class ProgressBar4 extends android.app.Activity
Demonstrates how to use an indetermiate progress indicator in the window's title bar.

Fields Summary
private boolean
mToggleIndeterminate
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle savedInstanceState)


    
        
        super.onCreate(savedInstanceState);

        // Request progress bar
        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
        setContentView(R.layout.progressbar_4);
        setProgressBarIndeterminateVisibility(mToggleIndeterminate);
        
        Button button = (Button) findViewById(R.id.toggle);
        button.setOnClickListener(new Button.OnClickListener() {
            public void onClick(View v) {
                mToggleIndeterminate = !mToggleIndeterminate;
                setProgressBarIndeterminateVisibility(mToggleIndeterminate);
            }
        });