Reputation: 528
I'm having problems setting up the responder for the actionbar menu.
I'm using this code and Eclipse keeps telling me "Syntax error on token " . ", delete this token" and "The method startActiviy(intent) is undefined for the type MainActivity"
This is my code:
public boolean onOptionsItemSelected (MenuItem item) {
switch (item.getItemId()) {
case.R.Id.about:
startActivity (new Intent (this, einstellungen.class));
return true;
default:
return super.onOptionsItemSelected(item);
}
return true;
}
Does anyone have an idea?
Thanks in advance!
Upvotes: 0
Views: 140