I answered once on SO, but I forgot where ... so here I go again.
Its pretty straightforward.
Create BaseActivity (extends Activity ). Enter in this code all the codes of the parameter menu. Override onOptionsMenu etc.
Now, for all of your other actions, instead of extending the action, BaseActivity . As a result, you will get the code for the options menu ... nifty eh?
Code once, use several times ...
OOP for victory!
Edit: As WarrenFaith points out, you need to create BaseListActivity and BaseMapActivity if you use ListActivity and MapActivity .
source share