title: Common code for include layout - (Example ActionBar)
body: <p>I am confused about the include layout:</p>
  
  <ol>
  <li>let's say I made a layout for an action bar named actionbar.xml</li>
  <li>I included this to all my other layouts</li>
  </ol>
  
  <p>Now how and where should I write the Java-code for the actionbar? If I write the <code>onclick</code>-function in say <code>main.java</code>?</p>
  
  <p>How will I be able to use the same in say, the second activity stored in <code>second.java</code>? Is there any other method than making an object of the class where the <code>onclick</code> for actionbar is defined?</p>