Android : How to handle 2 same Option Menus with one distinguish menu item

on Wednesday, January 28, 2015


ive got 2 activities with option menus. the option menus exists of 4 menu items. 3 of them (option1, option2 and option3) exist in both option menus. the option menus distinguish between the 4th menu item (option4 in activity1 and option5 in activity2).


Is there in Android an opportunity to outsource the 3 same options in - for example a OptionMenuHelper class - and access it from the 2 activities so that i dont have to implement 2 times exactly the same methods in onOptionsItemSelected(MenuItem)?


thanks in advice


pebbles


0 comments:

Post a Comment