ProgressBar in ANDROID…..

By | February 28, 2011

Progress bars are our basic needs when we want to show something for a long time or some progress takes a long time and we want to show it’s progress.
Keeping that in mind ANDROID also has built in progress views.
There are basically two types of progress views in ANDROID.

ProgressDialog.STYLE_SPINNER and ProgressDialog.STYLE_HORIZONTAL

Take a look at this simple example that loads a progressBar on “onCreate”….

public class Example extends Activity
{
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
    	super.onCreate(savedInstanceState);
    	setContentView(R.layout.main);
    	ProgressDialog dialog = ProgressDialog.show(Example.this, "", "Loading...", true);
    }
}

One thought on “ProgressBar in ANDROID…..

  1. Vinicius de Paula (@viniciusdepaula)

    Thx 4 share it! Very useful 😉

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *