title: Best practices for Android action bar
body: <p>I'm new to so and fairly new to android development too, and have already developed some bad habits. </p>
  
  <p>Basically I've coded up an app, using an old learning source as a reference which did not cover fragments. As such I have several standard activities which I am in the process of converting to fragments.</p>
  
  <p>One thing that I have not been able to find information on is the best practices for the action bar; is it best to define the action bar in the activity, or in the fragment?</p>
  
  <p>I notice that calling onCreateOptionsMenu(Menu menu, MenuInflater inflater) results in subtle changes from calling the same method in the activity, would it be possible to have advice on where it is best to call this and what benefits it provides?</p>
  
  <p>Thanks</p>