title: How to get a Fragment to remove itself, i.e. its equivalent of finish()?
body: <p>I'm converting an app to use fragments using the compatibility library.
  Now currently I have a number of activities (A B C D) which chain onto one another, D has a button 'OK' which when pressed calls finish which then bubbles up through <code>onActivityResult()</code> to additionally destroy C and B.</p>
  
  <p>For my pre Honycomb fragment version each activity is effectively a wrapper on fragments Af Bf Cf Df. All activities are launched via <code>startActivityForResult()</code> and <code>onActivityResult()</code> within each of the fragments can happily call <code>getActivity().finish()</code></p>
  
  <p>The problem that I am having though is in my Honeycomb version I only have one activity, A, and fragments Bf, Cf, Df are loaded using the <code>FragmentManager</code>.</p>
  
  <p>What I don't understand is what to do in Df when 'OK' is pressed in order to remove fragments Df, Cf, and Bf? </p>
  
  <p>I tried having the fragment popping itself off the stack but this resulted in an exception. <code>onActivityResult()</code> is useless because I have not loaded up the fragment using <code>startActivityForResult()</code>.</p>
  
  <p>Am I thinking about this completely the wrong way? Should I be implementing some sort of listener that communicates with either the parent fragment or activity in order to do the pop using the transaction manager?</p>