title: Android menu file
body: <p>I am developing an Android app with multiple Activities. In order to avoid writing the same menu and Intent listener code into each Activity, I decided to create one file and implement it on every Activity like the following:</p>
  
  <pre><code>public class MainActivity extends Activity implements CommonTools{ ...
  </code></pre>
  
  <p>My commonTools file which contains my menu code is as follows:</p>
  
  <pre><code>import android.view.Menu;
  
  public interface CommonTools {
  
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.activity_main, menu);
          menu.findItem(R.id.menu_home).setIntent(
              new Intent(this, MainActivity.class));
          menu.findItem(R.id.menu_articles).setIntent(
              new Intent(this, ArticlesActivity.class));
          return true;
      }
  }
  </code></pre>
  
  <p>The problem is I get an "Abstract methods do not specify a body" error message.</p>
  
  <p>I have not declared anything abstract and don't understand what the issue is. </p>