Override an Override?
<p>I have an Activity in a Library  that has a menu in it.  The menu has all the standard attributes as well as the @Override on onCreateOptionsMenu and onOptionsItemSelected.</p>

<p>In my actual project which imports above library I have another activity that extends teh above activity.   For this specific implementation of this program I want to have a different menu on this activity so inside this activities code base add add onCreateOptionsMenu and onOptionsItemSelected with the proper @Override, but i get the menu from the Library, not the override in the library.</p>

<p>What could I be doing wrong?</p>

<p><strong>Base Class:</strong></p>

<pre><code>public class ListItems extends ListActivity {
    public static final int LOGOUT  = 0;
    public static final int HISTORY  = 1;
    public static final int REFRESH  = 2;


@Override
public boolean onCreateOptionsMenu(Menu menu){
    menu.add(0, LOGOUT ,0,"Log Out");
    menu.add(0,HISTORY,0,"Order History");
    menu.add(0,REFRESH,0,"SMS");
    return true;
}

@Override
public boolean onOptionsItemSelected (MenuItem item){
    TextView textView = (TextView)findViewById(com.imobileminutes.library.R.id.text);
    switch (item.getItemId()){
       case LOGOUT:
            Intent logOut = new Intent(ListItems.this,MainScreen.class);
            startActivity(logOut);
            finish();
            return true;
        case HISTORY:
            Intent orderHistory = new Intent(this,OrderItems.class);
            startActivity(orderHistory);
            return true;
        case REFRESH:
            Intent orderHistory = new Intent(this,OrderItems.class);
            startActivity(orderHistory);
            return true;
}
    return false;
}
}
</code></pre>

<p><strong>Override Class</strong></p>

<pre><code>public class ListItems extends com.imobileminutes.library.ListItems {
    static final int SMS = 2;


@Override
public boolean onCreateOptionsMenu(Menu menu){
    Log.d("onCreateOptionsMenu", "My onCreateOptionsMenu ran");
    Toast.makeText(getApplicationContext(), "HEllo Menu Created", Toast.LENGTH_LONG).show();
    super.onCreateOptionsMenu(menu);
    return true;
}

@Override
public boolean onOptionsItemSelected (MenuItem item){
    Log.d("onCreateOptionsMenu", "My onOptionsItemSelected ran");
    Toast.makeText(getApplicationContext(), "HElloonOptionsItemSelected", Toast.LENGTH_LONG).show();

   super.onOptionsItemSelected(item);
    return false;
}
</code></pre>

<p>}</p>

<p><strong>CONCLUSION</strong>
It ended up being that my library was calling ListItems.this and CreateAccount.this which was referencing the activities in the library not in the extended classes. </p>

<p>I added an intent for every extended activity type and nwo call that, thus bringing up the extended activity rather than the base activity.</p>

<p>Thanks for the help guys.</p>
