Exemplo n.º 1
0
  public void onMenuClicked(MenuItem menuItem, String confirmMsg, final ProgressListener listener) {
    final int action = menuItem.getItemId();

    if (confirmMsg != null) {
      if (listener != null) listener.onConfirmDialogShown();
      ConfirmDialogListener cdl = new ConfirmDialogListener(action, listener);
      new AlertDialog.Builder(mActivity.getAndroidContext())
          .setMessage(confirmMsg)
          .setOnCancelListener(cdl)
          .setPositiveButton(R.string.ok, cdl)
          .setNegativeButton(R.string.cancel, cdl)
          .create()
          .show();
    } else {
      onMenuClicked(action, listener);
    }
  }
Exemplo n.º 2
0
 public AlbumView(GalleryActivity activity, SlotView.Spec spec, int cacheThumbSize) {
   super(activity.getAndroidContext());
   mCacheThumbSize = cacheThumbSize;
   setSlotSpec(spec);
   mActivity = activity;
 }