Since I'm new to Android programming, I came across one more little thing that I don't understand. Why does the onCreateOptionsMenu method below return super.onCreateOptionsMenu instead of just calling super.onCreateOptionsMenu (as is done in the onCreate method)?
(This is from an Android tutorial .)
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main_activity_actions, menu);
return super.onCreateOptionsMenu(menu);
}
(I did not find a duplicate question in StackOverflow. Maybe I'm asking a stupid question, or I'm just not good at it.)
source
share