public static ProgressDialog createProgressDialog(Context c,String message){
  ProgressDialog dialog=new ProgressDialog(c,ProgressDialog.STYLE_SPINNER);
  dialog.setIndeterminate(true);
  dialog.setMessage(message);
  dialog.setCanceledOnTouchOutside(false);
  return dialog;
}

public static ProgressDialog createProgressDialog ( Context c , String message ) { ProgressDialog dialog = new ProgressDialog ( c , ProgressDialog . STYLE_SPINNER ) ; dialog . setIndeterminate ( true ) ; dialog . setMessage ( message ) ; dialog . setCanceledOnTouchOutside ( false ) ; return dialog ; }
easy method to create a loading progressdialog
