I'm quite new to Android development and I'm trying to build an ActionBar with the ShareActionProvider, using the "stock" ActionBar (i.e. not using ActionBarSherlock), because I want to target ICS+ devices only.
I would like the history function enabled (as it is by default), but I don't want the most used intent icon near the share button, because it takes too much space.
I know that using ActionBarSherlock this is possible, but as I said I'm trying to do it with the stock ActionBar, so I would like to know how to overcome to this problem.
I've found these two related answers:
How to hide the share action (which use most) icon near the share action provider?
Android: ShareActionProvider with no history
but none of them clearly say how to edit the Android sources to have another "version" of the ActionBar that hides the icon.
I mean, how can I combine the two answers and ship my application with the modified ActionBar class that hides the most-used icon?
EDIT:
I'm looking for a brief list of operations that have to be done to extend the three classes ShareActionProvider, ActivityChooserView and ActivityChooserMode to build a modified version of them that doesn't raise errors in Eclipse.
AFAIK this is not documented elsewhere on the web (Google doesn't give results).