/** Allows the project manager to create a new task. */
  public void createTask(MenuItem item) {

    if (this.selectedMilestone != null && this.selectedMilestone.getMilestoneId() != null) {
      CreateTaskFragment taskFrag = new CreateTaskFragment();
      Bundle arguments = new Bundle();
      arguments.putString("milestoneId", this.selectedMilestone.getMilestoneId());
      arguments.putString("projectId", this.selectedProject.getProjectId());
      taskFrag.setArguments(arguments);
      this.currFragment = taskFrag;
      taskFrag.show(getFragmentManager(), "Diag");
    }
  }
        @Override
        public void onClick(View v) {

          if (isResumed() && !mIsProcessing) {
            if (mProgress != null) {
              mProgress.setVisibility(View.VISIBLE);
            }
            mIsProcessing = true;
            if (mReturnImmediately) {
              String token = UUID.randomUUID().toString();
              EditorBitmapCache.getInstance()
                  .put(
                      token,
                      EditorBitmapCache.getInstance().get(EditorBitmapCache.Keys.TRIMMED_BITMAP));

              Intent intent = new Intent();
              intent.setClass(getActivity(), ImojiCreateService.class);
              intent.putExtra(ImojiCreateService.CREATE_TOKEN_BUNDLE_ARG_KEY, token);
              getActivity().startService(intent);

              notifySuccess(token);

            } else {

              CreateTaskFragment f =
                  (CreateTaskFragment)
                      getFragmentManager().findFragmentByTag(CreateTaskFragment.FRAGMENT_TAG);
              if (f == null) {
                f = CreateTaskFragment.newInstance(getTags(), false);
              }
              getFragmentManager()
                  .beginTransaction()
                  .add(f, CreateTaskFragment.FRAGMENT_TAG)
                  .commit();
            }
          }
        }