@Override
  protected Dialog onCreateDialog(int id) {
    if (id == ID_DIALOG_MODERATING) {
      ProgressDialog loadingDialog = new ProgressDialog(CommentsActivity.this);
      if (commentList.checkedCommentTotal <= 1) {
        loadingDialog.setMessage(getResources().getText(R.string.moderating_comment));
      } else {
        loadingDialog.setMessage(getResources().getText(R.string.moderating_comments));
      }
      loadingDialog.setIndeterminate(true);
      loadingDialog.setCancelable(false);
      return loadingDialog;
    } else if (id == ID_DIALOG_REPLYING) {
      ProgressDialog loadingDialog = new ProgressDialog(CommentsActivity.this);
      loadingDialog.setMessage(getResources().getText(R.string.replying_comment));
      loadingDialog.setIndeterminate(true);
      loadingDialog.setCancelable(false);
      return loadingDialog;
    } else if (id == ID_DIALOG_DELETING) {
      ProgressDialog loadingDialog = new ProgressDialog(CommentsActivity.this);
      if (commentList.checkedCommentTotal <= 1) {
        loadingDialog.setMessage(getResources().getText(R.string.deleting_comment));
      } else {
        loadingDialog.setMessage(getResources().getText(R.string.deleting_comments));
      }
      loadingDialog.setIndeterminate(true);
      loadingDialog.setCancelable(false);
      return loadingDialog;
    }

    return super.onCreateDialog(id);
  }
Exemplo n.º 2
0
 @Override
 protected Dialog onCreateDialog(int id, Bundle args) {
   if (!haveDestroy) {
     Dialog dialog = null;
     switch (id) {
       case DIALOG_MESSAGE:
         AlertDialog messageDialog = new AlertDialog.Builder(this).create();
         if (args != null) {
           messageDialog.setMessage(args.getString(KEY_DIALOG_MESSAGE));
           messageDialog.setButton(
               AlertDialog.BUTTON_POSITIVE,
               args.getString(KEY_DIALOG_CONFRIM_BUTTON_NAME),
               new android.content.DialogInterface.OnClickListener() {
                 @Override
                 public void onClick(DialogInterface dialog, int which) {}
               });
         }
         dialog = messageDialog;
         break;
       case DIALOG_PROGRESS:
         ProgressDialog progressDialog = new ProgressDialog(this);
         progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
         progressDialog.setCancelable(false);
         if (args != null) {
           progressDialog.setMessage(args.getString(KEY_DIALOG_MESSAGE));
         }
         dialog = progressDialog;
         break;
     }
     return dialog;
   } else {
     return null;
   }
 }
  public void sendVideo(View view) {
    if (TextUtils.isEmpty(localPath)) {
      EMLog.e("Recorder", "recorder fail please try again!");
      return;
    }
    if (msc == null)
      msc =
          new MediaScannerConnection(
              this,
              new MediaScannerConnectionClient() {

                @Override
                public void onScanCompleted(String path, Uri uri) {
                  EMLog.d(TAG, "scanner completed");
                  msc.disconnect();
                  progressDialog.dismiss();
                  setResult(RESULT_OK, getIntent().putExtra("uri", uri));
                  finish();
                }

                @Override
                public void onMediaScannerConnected() {
                  msc.scanFile(localPath, "video/*");
                }
              });

    if (progressDialog == null) {
      progressDialog = new ProgressDialog(this);
      progressDialog.setMessage("processing...");
      progressDialog.setCancelable(false);
    }
    progressDialog.show();
    msc.connect();
  }
Exemplo n.º 4
0
 @Override
 protected void onPreExecute() {
   super.onPreExecute();
   dialog.setMessage(getString(R.string.editor_uploading_image));
   dialog.setCancelable(false);
   dialog.show();
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    setContentView(R.layout.searchstore_layout);
    getWindow()
        .setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    // Recibo la palabra de la activity anterior
    Bundle b = this.getIntent().getExtras();

    // La paso a una variable String
    word = b.getString("SearchText");

    result = (TextView) findViewById(R.id.empty_result);
    result.setVisibility(View.INVISIBLE);

    PDialog = new ProgressDialog(this);
    PDialog.setMessage(getString(R.string.searching));
    PDialog.setIndeterminate(false);
    PDialog.setCancelable(false);
    PDialog.show();

    ABar = getActionBar();
    ABar.setDisplayHomeAsUpEnabled(true);

    snc = new SearchNetworkConnection(listener, this);
    ibnc = new InfoBuyNetworkConnection(this);

    ibnc.execute(new Configuration(this).getUserId());

    snc.execute(word);
  }
Exemplo n.º 6
0
 void showProgress(int msgId) {
   progress = new ProgressDialog(this);
   progress.setMessage(getString(msgId));
   progress.setIndeterminate(true);
   progress.setCancelable(true);
   progress.setOnCancelListener(abortListener);
   final int msgId2 = msgId;
   progress.setButton(
       DialogInterface.BUTTON_POSITIVE,
       getString(R.string.background),
       new DialogInterface.OnClickListener() {
         public void onClick(DialogInterface d, int which) {
           // Cheat slightly: just launch home screen
           startActivity(new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME));
           // Argh, can't prevent a dismiss at this point, so re-show it
           showProgress(msgId2);
           Toast.makeText(SGTPuzzles.this, R.string.bg_unreliable_warn, Toast.LENGTH_LONG).show();
         }
       });
   progress.setButton(
       DialogInterface.BUTTON_NEGATIVE,
       getString(android.R.string.cancel),
       handler.obtainMessage(MsgType.ABORT.ordinal()));
   progress.show();
 }
Exemplo n.º 7
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.main_upload_layout);
   pDialog = new ProgressDialog(this);
   pDialog.setCancelable(false);
 }
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.tip_web);

    url = getIntent().getStringExtra("url");
    dialog = new ProgressDialog(this);
    dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    dialog.setCancelable(false);
    dialog.show();

    mWebView = (WebView) findViewById(R.id.foodWebView);
    mWebView.getSettings().setBuiltInZoomControls(true);
    mWebView.setVisibility(View.INVISIBLE);
    mWebView.setWebViewClient(new goLibraryClient()); // WebViewClient 지정
    mWebView.getSettings().setJavaScriptEnabled(true);
    mWebView.setWebChromeClient(
        new WebChromeClient() {
          public void onProgressChanged(WebView view, int progress) {
            dialog.setProgress(progress);

            if (progress == 100) {
              mWebView.setVisibility(View.VISIBLE);
              dialog.dismiss();
            } else {
              dialog.show();
            }
          }
        });
    mWebView.loadUrl(url);
  }
Exemplo n.º 9
0
 // Constructor
 public ServerRequests(Context context) {
   // Instantiate dialog progress
   progressDialog = new ProgressDialog(context);
   progressDialog.setCancelable(false);
   progressDialog.setTitle("Processing");
   progressDialog.setMessage("Please wait...");
 }
Exemplo n.º 10
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setTheme();
    setContentView(R.layout.waypoint);
    setTitle(R.string.waypoint_title);

    // get parameters
    Bundle extras = getIntent().getExtras();

    // try to get data from extras
    if (extras != null) {
      id = extras.getInt("waypoint");
      geocode = extras.getString("geocode");
    }

    if (id <= 0) {
      showToast(res.getString(R.string.err_waypoint_unknown));
      finish();
      return;
    }

    if (geo == null) {
      geo = app.startGeo(geoUpdate);
    }

    waitDialog = ProgressDialog.show(this, null, res.getString(R.string.waypoint_loading), true);
    waitDialog.setCancelable(true);

    (new loadWaypoint()).start();
  }
Exemplo n.º 11
0
    @Override
    protected void onPreExecute() {
      super.onPreExecute();

      /** INSTANTIATE AND CONFIGURE THE PROGRESS DIALOG * */
      pdUpdateTax = new ProgressDialog(TaxModifier.this);

      pdUpdateTax.setMessage("Please wait while the new Tax is being added.");
      pdUpdateTax.setIndeterminate(false);
      pdUpdateTax.setCancelable(true);
      pdUpdateTax.show();

      /** INSTANTIATE THE DATABASE HELPER CLASS * */
      db = new DBResto(TaxModifier.this);

      /** GET THE TAX NAME FROM THE EDITTEXT * */
      tax_name = edtTaxName.getText().toString().trim();

      /** CONSTRUCT A QUERY TO FETCH THE TAXES ON RECORD * */
      String strQueryData =
          "SELECT * FROM " + db.TAXES + " WHERE " + db.TAX_NAME + " = '" + tax_name + "'";

      /** CAST THE QUERY IN THE CURSOR TO FETCH THE RESULTS * */
      cursor = db.selectAllData(strQueryData);
    }
Exemplo n.º 12
0
 public static Dialog showProgressDialog(Context c, String message) {
   ProgressDialog progressDialog = new ProgressDialog(c);
   progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
   progressDialog.setMessage(message);
   progressDialog.setCancelable(false);
   return progressDialog;
 }
Exemplo n.º 13
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);

    inputEmail = (EditText) findViewById(R.id.email);
    inputPassword = (EditText) findViewById(R.id.password);
    btnLogin = (Button) findViewById(R.id.btnLogin);
    btnLinkToRegister = (Button) findViewById(R.id.btnLinkToRegisterScreen);

    // Progress dialog
    pDialog = new ProgressDialog(this);
    pDialog.setCancelable(false);

    // SQLite database handler
    db = new SQLiteHandler(getApplicationContext());

    // Session manager
    session = new SessionManager(getApplicationContext());

    // Check if user is already logged in or not
    if (session.isLoggedIn()) {
      // User is already logged in. Take him to main activity
      Intent intent = new Intent(LoginActivity.this, MainActivity.class);
      startActivity(intent);
      finish();
    }

    // Login button Click Event
    btnLogin.setOnClickListener(
        new View.OnClickListener() {

          public void onClick(View view) {
            String email = inputEmail.getText().toString().trim();
            String password = inputPassword.getText().toString().trim();

            // Check for empty data in the form
            if (!email.isEmpty() && !password.isEmpty()) {
              // login user
              checkLogin(email, password);
            } else {
              // Prompt user to enter credentials
              Toast.makeText(
                      getApplicationContext(), "Please enter the credentials!", Toast.LENGTH_LONG)
                  .show();
            }
          }
        });

    // Link to Register Screen
    btnLinkToRegister.setOnClickListener(
        new View.OnClickListener() {

          public void onClick(View view) {
            Intent i = new Intent(getApplicationContext(), RegisterActivity.class);
            startActivity(i);
            finish();
          }
        });
  }
Exemplo n.º 14
0
 @Override
 protected void onPreExecute() {
   dialog = new ProgressDialog(context);
   dialog.setCancelable(false);
   dialog.setMessage(context.getString(R.string.toast_wait_a_minute));
   dialog.show();
 }
  private void init(ListModeBean navbean) {
    TTSController.getInstance(mcontext).startSpeaking();
    // 获取当前经纬度
    geoLat = PreferencesUtil.getStringPreferences(mcontext, "currentlat");
    geoLng = PreferencesUtil.getStringPreferences(mcontext, "currentlng");
    startGeoLat = Double.parseDouble(geoLat);
    startGeoLng = Double.parseDouble(geoLng);
    // 获取目的地经纬度
    edoLat = navbean.getElectricLatitude();
    edoLng = navbean.getElectricLongitude();
    Log.i("fragment", navbean.getElectricName() + edoLat + edoLng);
    if (!Tools.isEmptyString(edoLat) && !Tools.isEmptyString(edoLng)) {
      endEdoLat = Double.parseDouble(edoLat.trim());
      endEdoLng = Double.parseDouble(edoLng.trim());
      NaviLatLng mNaviStart = new NaviLatLng(startGeoLat, startGeoLng);
      NaviLatLng mNaviEnd = new NaviLatLng(endEdoLat, endEdoLng);
      mStartPoints.clear();
      mEndPoints.clear();
      mStartPoints.add(mNaviStart);
      mEndPoints.add(mNaviEnd);
    }

    mRouteCalculatorProgressDialog = new ProgressDialog(mcontext);
    mRouteCalculatorProgressDialog.setCancelable(true);
    AMapNavi aMapNavi = AMapNavi.getInstance(mcontext);
    if (this instanceof AMapNaviListener && aMapNavi != null) {
      aMapNavi.setAMapNaviListener(this);
    }
  }
 @Override
 protected void onPreExecute() {
   dialog = new ProgressDialog(QuranPreferenceActivity.this);
   dialog.setMessage(getString(R.string.prefs_calculating_app_size));
   dialog.setCancelable(false);
   dialog.show();
 }
Exemplo n.º 17
0
 private void progressDialogInitialization() {
   progressDialog = new ProgressDialog(this);
   progressDialog.setCancelable(false);
   progressDialog.setTitle("Loading ...");
   progressDialog.setMessage("Please wait");
   progressDialog.show();
 }
Exemplo n.º 18
0
 @Override
 protected Dialog onCreateDialog(int id) { // Dialog preference
   Dialog dialog = null;
   switch (id) {
     case 0:
       {
         mProgressDialog = new ProgressDialog(this);
         mProgressDialog.setMessage("회원가입을 요청 중입니다...");
         mProgressDialog.setIndeterminate(true);
         mProgressDialog.setCancelable(true);
         return mProgressDialog;
       }
     case 1:
       {
         AlertDialog.Builder builder = new AlertDialog.Builder(this);
         builder.setTitle("Error");
         builder.setMessage("중복된 메일입니다.");
         builder.setNeutralButton(
             "OK",
             new DialogInterface.OnClickListener() {
               @Override
               public void onClick(DialogInterface dialog, int which) {
                 dialog.dismiss();
               }
             });
         AlertDialog errorAlert = builder.create();
         return errorAlert;
       }
   }
   return null;
 }
  /**
   * Called when the activity is first created. Retrieves the wufoo form and inserts it into the
   * view.
   *
   * @param savedInstanceState Um I don't even know. Read the Android documentation.
   */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    if (android.os.Build.VERSION.SDK_INT >= 11) setTheme(R.style.Default_New);
    super.onCreate(savedInstanceState);

    wv = new WebView(this);
    wv.getSettings().setJavaScriptEnabled(true);
    wv.addJavascriptInterface(new JavascriptInterface(), "HTMLOUT");
    wv.setWebViewClient(new RestoreDraftClient());

    FrameLayout fl = new FrameLayout(this);
    fl.setBackgroundResource(R.color.backClr);
    fl.addView(wv);
    setContentView(fl);
    setTitle(R.string.contact);

    baconPDialog =
        Callisto.BaconDialog(
            ContactForm.this, this.getResources().getString(R.string.loading) + "...", null);
    baconPDialog.setOnCancelListener(
        new OnCancelListener() {
          @Override
          public void onCancel(DialogInterface dialog) {
            // Finish the activity if the fetching is canceled
            finish();
          }
        });
    baconPDialog.setCancelable(true);
    thatWhichWillReadTheCSS = new ReadCSS();
    thatWhichWillReadTheCSS.execute((Void[]) null);
  }
Exemplo n.º 20
0
  private void getNewGPS() {
    mDialog = new ProgressDialog(this);
    mDialog.setMessage(getString(R.string.Map_Getting_GPS_Signal));
    mDialog.setCancelable(true);
    mDialog.show();

    new Thread(
            new Runnable() {

              @Override
              public void run() {
                // TODO Auto-generated method stub
                Looper.prepare();
                // set update the location data in 1secs or 5meters
                unbindService(mConnection);
                bindService(
                    new Intent(MapViewMain.this, HelperGpsHandler.class),
                    mConnection,
                    Context.BIND_AUTO_CREATE);

                Looper.loop();
              }
            })
        .start();
  }
Exemplo n.º 21
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_result);

    final ProgressDialog progressDialog;

    progressDialog = new ProgressDialog(ResultActivity.this);
    progressDialog.setMessage("Please wait...");
    progressDialog.setCancelable(false);
    progressDialog.show();

    Handler handler = new Handler();
    handler.postDelayed(
        new Runnable() {
          public void run() {
            progressDialog.dismiss();

            ImageView imageView = (ImageView) findViewById(R.id.imageView2);
            imageView.setImageResource(R.drawable.lol);

            TextView name = (TextView) findViewById(R.id.textView3);
            name.setText("{commonAtr: \"banana\"  }"); // Brian Comment: Dummy for presentation
          }
        },
        5500);
  }
  private void payWithExistingCard(PayPalCard card) {
    final ProgressDialog dialog = new ProgressDialog(this);
    dialog.setCancelable(false);
    dialog.setTitle("Processing");
    dialog.setMessage("One moment");
    dialog.show();

    card.chargeCard(
        paypalEnvironment,
        printOrder.getCost(printOrder.getCurrencyCode()),
        getPayPalCurrency(printOrder.getCurrencyCode()),
        "",
        new PayPalCardChargeListener() {
          @Override
          public void onChargeSuccess(PayPalCard card, String proofOfPayment) {
            dialog.dismiss();
            submitOrderForPrinting(proofOfPayment);
            card.saveAsLastUsedCard(PaymentActivity.this);
          }

          @Override
          public void onError(PayPalCard card, Exception ex) {
            dialog.dismiss();
            showErrorDialog(ex.getMessage());
          }
        });
  }
Exemplo n.º 23
0
  /**
   * Shows a simple native progress dialog<br>
   * Subclass can override below two methods for custom dialogs- <br>
   * 1. showProgressDialog <br>
   * 2. removeProgressDialog
   *
   * @param bodyText
   */
  public void showProgressDialog(String bodyText) {
    if (isFinishing()) {
      return;
    }
    if (mProgressDialog == null) {
      mProgressDialog = new ProgressDialog(BaseActivity.this);
      mProgressDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
      mProgressDialog.setCancelable(false);
      mProgressDialog.setOnKeyListener(
          new Dialog.OnKeyListener() {
            @Override
            public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
              if (keyCode == KeyEvent.KEYCODE_CAMERA || keyCode == KeyEvent.KEYCODE_SEARCH) {
                return true; //
              }
              return false;
            }
          });
    }

    mProgressDialog.setMessage(bodyText);
    if (!mProgressDialog.isShowing()) {
      mProgressDialog.show();
    }
  }
  public void onButtonApplyClicked(View view) {
    if (printOrder.getPromoCode() != null) {
      // Clear promo code
      printOrder.clearPromoCode();
      updateViewsBasedOnPromoCodeChange();
    } else {
      // Apply promo code
      final ProgressDialog dialog = new ProgressDialog(this);
      dialog.setCancelable(false);
      dialog.setTitle("Processing");
      dialog.setMessage("Checking Code...");
      dialog.show();

      String promoCode = ((EditText) findViewById(R.id.edit_text_promo_code)).getText().toString();
      printOrder.applyPromoCode(
          promoCode,
          new ApplyPromoCodeListener() {
            @Override
            public void onPromoCodeApplied(PrintOrder order, BigDecimal discount) {
              dialog.dismiss();
              Toast.makeText(PaymentActivity.this, "Discount applied!", Toast.LENGTH_LONG).show();
              updateViewsBasedOnPromoCodeChange();
            }

            @Override
            public void onError(PrintOrder order, Exception ex) {
              dialog.dismiss();
              showErrorDialog(ex.getMessage());
            }
          });
    }
  }
Exemplo n.º 25
0
 private void submitEssay() {
   final ProgressDialog progress = new ProgressDialog(CopyEssay.this);
   progress.setMessage(getString(R.string.please_wait_message));
   progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
   progress.setCancelable(false);
   progress.show();
   String t = title.getText().toString();
   String s = subject.getText().toString();
   ParseObject essay = new ParseObject("essays");
   essay.put("title", t);
   essay.put("subject", s);
   essay.put("content", essay_txt.getText().toString());
   essay.saveInBackground(
       new SaveCallback() {
         @Override
         public void done(com.parse.ParseException e) {
           if (e != null) {
             e.printStackTrace();
           } else {
             progress.dismiss();
             displaySnackbar();
             Intent intent = new Intent(CopyEssay.this, HomeScreen.class);
             startActivity(intent);
           }
         }
       });
 }
Exemplo n.º 26
0
 public void showWaitDialog(Context cxt) {
   pd = new ProgressDialog(cxt);
   pd.setMessage(cxt.getString(R.string.connecting));
   pd.setIndeterminate(true);
   pd.setCancelable(false);
   pd.show();
 }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    Context context = getActivity();

    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.fragment_training_detail, container, false);

    // Expandable Summary
    ExpandList = (ExpandableListView) view.findViewById(R.id.training_summary);

    Bundle bundle = getArguments();
    String trainingCode = bundle.getString("trainingCode");

    trainingUrl = String.format("http://eas.elephorm.com/api/v1/trainings/%1$s", trainingCode);

    training_title = (TextView) view.findViewById(R.id.training_title);

    training_video = (VideoView) view.findViewById(R.id.training_video);
    training_video.setMediaController(new MediaController(context));

    // BOITE DE DIALOGUE
    pDialog = new ProgressDialog(getActivity());
    pDialog.setMessage("Chargement...");
    pDialog.setCancelable(false);

    makeJsonObjectRequest();

    ExpandList.setOnChildClickListener(
        new ExpandableListView.OnChildClickListener() {
          @Override
          public boolean onChildClick(
              ExpandableListView expandableListView,
              View view,
              int parentPosition,
              int childPosition,
              long l) {
            String courseId = list.get(parentPosition).getItems().get(childPosition).getId();
            Intent intent = new Intent(getActivity(), CourseActivity.class);
            intent.putExtra("courseId", courseId);
            intent.putExtra("trainingUrl", trainingUrl);
            startActivity(intent);
            return false;
          }
        });

    training_video.start();

    training_video.setOnCompletionListener(
        new MediaPlayer.OnCompletionListener() {
          @Override
          public void onCompletion(MediaPlayer mediaPlayer) {
            System.out.println("C'est fini :(");
            saveHistory();
          }
        });

    return view;
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    dialog = new ProgressDialog(this);
    dialog.setCancelable(false);
    session = new SessionManager(getApplicationContext());
    setContentView(R.layout.activity_account_settings);
    avatarView = (ImageView) findViewById(R.id.avatar_view);
    avatarView.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View view) {
            Intent intent = new Intent();
            intent.setType("image/*");
            intent.setAction(Intent.ACTION_GET_CONTENT);
            startActivityForResult(Intent.createChooser(intent, "Select Picture"), 1);
          }
        });
    saveButton = (Button) findViewById(R.id.save_button);
    saveButton.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            updateAvatar();
          }
        });
  }
Exemplo n.º 29
0
 private void initLoadingDialog() {
   if (progressDialog == null) {
     progressDialog = new ProgressDialog(this);
     progressDialog.setMessage(getString(R.string.settings_cuc_loading));
     progressDialog.setCancelable(false);
   }
 }
Exemplo n.º 30
0
 // PRE-EJECUCION: esto se ejecutara ANTES del background, en este caso muestra un dialogo de
 // proceso y un mensaje que se puede editar
 protected void onPreExecute() {
   pDialog = new ProgressDialog(LoginActivity.this);
   pDialog.setMessage("Autenticando ...");
   pDialog.setIndeterminate(false);
   pDialog.setCancelable(true);
   pDialog.show();
 }