Mingfai,
You can share an ActivityMenuComponent between two classes. You simply have to inject the shared component into both and annotate that Injection with @RegisterListener:
class MenuController implements ActivityMenuComponent{...}
@Activity
class One{
@inject @RegisterListener
MenuController controller;
}
@Activity
class Twp{
@inject @RegisterListener
MenuController controller;
}
And yes, you can inject the current Activity into the MenuController. Just make sure the MenuController is either prototype scoped (prefered) or context scoped.
If you're playing with ActionBars, I'd appreciate some feedback. I have an issue open currently to investigate integrating ActionBarSherlock as a plugin.
Hope that clears up any questions.
John