Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

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

public class Main {
    public static ProgressDialog progressDialog;

    public static void showProgressDialog(String title, String msg, Context context) {
        if (progressDialog != null && progressDialog.isShowing()) {
            return;
        }
        progressDialog = ProgressDialog.show(context, title, msg);
        progressDialog.setCancelable(true);
    }

    public static void showProgressDialog(String msg, Context context) {
        showProgressDialog(null, msg, context);
    }
}