I'm in the process of migrating from ActionBarSherlock to ActionBarCompat library that was introduced in Google IO 2013 (I do this so I can use ActionBarDrawerToggle).
I have already sorted out all the necessary dependencies (AppCompat, latest support library...), fixed all the imports but now when I try to use ActionBarActivity's onMenuItemSelected
I get an error.
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
...
}
Error:
Cannot override the final method from ActionBarActivity
The original method from ActionBarActivity
(inherited from FragmentActivity
) is final. When I used ABS, this was working, now I can't override the method.
(MenuItem is of class android.view.MenuItem
and not the compat version...)
Am I missing something ?
Instead of using onMenuItemSelected
I used onOptionsItemSelected
and the code compiled okay.
Can it be that onMenuItemSelected
appears in the docs but not in the code ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With