title: Android non-UI Fragment usage
body: <p>I am going through the <a href="http://developer.android.com/guide/components/fragments.html#AddingWithoutUI">Android documentation on Fragments</a> . The layout that defines the UI of a Fragment may be defined in the layout of the Activity, in a separate .xml file or not at all.</p>
  
  <p>According to the documentation </p>
  
  <blockquote>
    <p>you can also use a fragment to provide a background behavior for the activity without presenting additional UI.</p>
  </blockquote>
  
  <p>Why would I need to use another Fragment to add functionality to an Activity instead of defining a few more functions within the Activity? Would such a non-UI Fragment be used just for the sake of modularity? Is there another reason for adopting such an approach? I would appreciate an example of when it is suitable to use a non-UI fragment.</p>
  
  <p>Thank you in advance for your assistance.</p>