protected void displayProgressDialog() {

    try {
      if (progressDialog == null) {
        progressDialog = new MyProgressDialog(getActivity());
      }
      progressDialog.show();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
  protected void dismissProgressDialog() {

    if (progressDialog != null && progressDialog.isShowing()) {
      progressDialog.dismiss();
    }
  }