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 {
    public static ProgressDialog showProgressDialog(Context context, String text) {
        if (null != context) {
            ProgressDialog dialog = new ProgressDialog(context);
            dialog.setMessage(text);
            dialog.setIndeterminate(true);
            dialog.setCancelable(false);
            dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
            dialog.show();
            return dialog;
        }
        return null;
    }
}