start Progress Dialog - Android User Interface

Android examples for User Interface:ProgressDialog

Description

start Progress Dialog

Demo Code


//package com.java2s;

import android.app.ProgressDialog;
import android.content.Context;

public class Main {
    private static ProgressDialog progressDialog = null;

    public static void startProgressDialog(String title, String message,
            Context context) {//from   w  w  w  . j  a  va2 s. c  o  m

        progressDialog = new ProgressDialog(context);
        progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        progressDialog.setTitle(title);
        progressDialog.setMessage(message);
        progressDialog.show();
    }
}

Related Tutorials