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 Comment

  1. Vinicius de Paula (@viniciusdepaula) August 1, 2013 at 11:41 pm

    Thx 4 share it! Very useful đŸ˜‰

     

Leave a Reply

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

 

 

 

Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.