You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
The generated code for onOptionsItemSelected calls your superclass's onOptionsItemSelected() before the subclass, removing your ability to override functionality in the subclass. I believe the only workaround is to override onOptionsItemSelected() in your activity (rather than use @OptionsItem annotation) because I don't think there's a way to achieve the same goal using AndroidAnnotations.
Here's the generated code. My base activity class handles android.R.id.home.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
boolean handled = super.onOptionsItemSelected(item);
if (handled) {
return true;
}
int itemId_ = item.getItemId();
if (itemId_ == android.R.id.home) {
onHomeTapped();
return true;
}
return false;
}