Exemplo n.º 1
0
 @Override
 public void onDestroy() {
   super.onDestroy();
   if (mProgressDialog != null) {
     mProgressDialog.dismiss();
   }
 }
Exemplo n.º 2
0
  @Override
  public void onStop() {
    super.onStop();

    // if activity is closed suddenly,
    // dismiss the progress dialog.
    if (mProgressDialog != null) {
      mProgressDialog.dismiss();
    }
  }
Exemplo n.º 3
0
  @Override
  public void takePicture() {
    mTakePictureBtn.setEnabled(false);
    mProgressDialog.show();

    PictureTransaction pictureTransaction = new PictureTransaction(getHost());
    pictureTransaction.needBitmap(true);
    pictureTransaction.flashMode(flashMode);
    super.takePicture(pictureTransaction);
  }
Exemplo n.º 4
0
  @Override
  public void onCreate(Bundle state) {
    super.onCreate(state);
    setRetainInstance(true);

    SimpleCameraHost.Builder builder =
        new SimpleCameraHost.Builder(new DemoCameraHost(getActivity()));
    setHost(builder.useFullBleedPreview(true).build());

    mProgressDialog = new ProgressDialog(getActivity());
    mProgressDialog.setMessage(getString(R.string.progress_title));
    mProgressDialog.setIndeterminate(true);
    mProgressDialog.setCancelable(false);
  }