Common Android Problems: Shared Menus across multiple activities

If you ever run into a case where you need a Shared options menu across several activities in an Android application, here’s some code on how to solve it. 

https://github.com/tejaswiyvs/AndroidSampleCode

The code just uses a common class which implements onCreateOptionsMenu(), onOptionsItemSelected() for all the common items. Menu item handling is done as usual. 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s