title: Showing and hiding the action bar in fragments
body: <p>I have a project with one activity and several fragments. The fragments are replaced from the activity. The main menu fragment should not have action bar, but the action bar should persist on all other fragments. Also the default back button should work. I am using this code: <i>getActivity().getActionBar().hide();</i> to hide the actionbar and</p>
  
  <pre><code>ActionBar actionBar = getActivity().getActionBar();
  actionBar.setHomeButtonEnabled(true);
  actionBar.setDisplayHomeAsUpEnabled(true);
  actionBar.show();
  </code></pre>
  
  <p>to show it.</p>
  
  <p>But what confuses me most is the theme. Which theme should i use in order to have light background and should i define all properties like textColor, background when extending a theme like ThemeOverlay.AppCompat.ActionBar? This theme made a mess to the UI.
  What is the best way to do all this?</p>
  
  <p>styles.xml</p>
  
  <pre><code>&lt;!-- Base application theme. --&gt;
  &lt;style name="AppTheme" parent="ThemeOverlay.AppCompat.ActionBar"&gt;
      &lt;item name="actionBarStyle"&gt;@drawable/actionbar_background&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>Thanks.</p>