title: Why does getFragmentManager() return null the 2nd time?
body: <p>I have an android application with a submit button.  Pressing submit saves form data into the parse cloud, then replacing the current fragment with a different one:</p>
  
  <pre><code>    submitAnswerBtn.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              String answer = answerET.getText().toString();
              ParseUser currentUser = ParseUser.getCurrentUser();
              Answer newAnswer = new Answer(answer, qid, currentUser);
              newAnswer.saveInBackground(new SaveCallback() {
                  @Override
                  public void done(ParseException e) {
                      FragmentManager fm = getActivity().getSupportFragmentManager();
                      fm.popBackStack();
                  }
              });
          }
      });
  </code></pre>
  
  <p>I noticed I can crash the app if I quickly hit the submit button twice.  After the crash I see the form data in my parse table twice.  </p>
  
  <ol>
  <li><p>What is the best practice for preventing double submissions?  I was thinking of not persisting if the time between 2 submit clicks is less than 3 seconds:</p>
  
  <pre><code>DateTime lastTimestamp = null;
  public void onClick(View v) {
      DateTime currentTimestamp = DateTime.now();
      if(lastTimestamp == null)
          lastTimestamp = currentTimestamp;
  
      DateTime betweenClicks = currentTimestamp - lastTimestamp;
      lastTimestamp = currentTimestamp;
      // if a click happened within 3 seconds of the last one, show error and dont save again
      if(0 &lt; betweenClicks &lt;= 3 seconds)
      // show error dialog here
      return;
  
      String answer = answerET.getText().toString();
      // rest of the code(save into parse) 
  </code></pre></li>
  <li><p>Not that it matters for my solution, but the debugger showed that the crash was due to getFragmentManager() returning null the second time, why is it null the second time?  If I submit normally, then submit another answer the same way it works fine.</p></li>
  </ol>