title: Sharing menu bar between activities
body: <p>I have a menu bar on my app, that I need to share between 5 of my activities. My menu bar (= 5 buttons allowing to switch between activities) has exactly the same UI and the same behavior for any activity so I would like to share both menu bar XML view code and controller code.</p>
  
  <p>I already found a way to share the XML code using <a href="https://developer.android.com/training/improving-layouts/reusing-layouts" rel="nofollow noreferrer">Reusable UI Components</a> but I can't find a way to share the controller code that controls the menu bar buttons clicks.</p>
  
  <p>Note: my menu bar is a custom-made one, not the Android <a href="http://developer.android.com/guide/topics/ui/menus.html" rel="nofollow noreferrer">Options Menu</a> one.</p>
  
  <p>Thanks in advance.</p>