Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.app.ProgressDialog;
import android.content.Context;

public class Main {
    static ProgressDialog progressDlg = null;

    public static void showProgressDlg(Context ctx, String strMessage) {

        if (null == progressDlg) {
            if (ctx == null)
                return;
            progressDlg = new ProgressDialog(ctx);
            progressDlg.setProgressStyle(ProgressDialog.STYLE_SPINNER);
            progressDlg.setMessage(strMessage);
            progressDlg.setIndeterminate(false);
            progressDlg.setCancelable(true);
            progressDlg.show();
        }
    }
}