Java tutorial
//package com.java2s; import android.app.Activity; import android.app.ProgressDialog; public class Main { public static ProgressDialog showDialog(Activity context, @SuppressWarnings("SameParameterValue") String strContent) { if (context != null) { ProgressDialog infoDialog = new ProgressDialog(context); infoDialog.setMessage(strContent); infoDialog.show(); return infoDialog; } return null; } }