This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Description
AndroidAnnotations version:
4.2.0
Android compile SDK version:
Support libs: 25.3.0
Annotated code:
@OptionsItem(android.R.id.home)
void homeClicked() {
finish();
}
Expected generated code:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemId_ = item.getItemId();
if (itemId_ == android.R.id.home) {
homeClicked();
return true;
}
return super.onOptionsItemSelected(item);
}
Actual generated code:
import android.R;
...
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemId_ = item.getItemId();
if (itemId_ == R.id.home) {
homeClicked();
return true;
}
return super.onOptionsItemSelected(item);
}
lint warning:
Don't include android.R here; use a fully qualified name for each usage instead
Seems to be new in Android Tools 23.3.
(or maybe I shouldn't listen for that button at all! 😄)