Search code examples
guiceroboguice

Using Roboguice 2 without inheriting from RoboActivity


I am using a BaseActivity which handles the menu and every activity that has a menu extends from the BaseActivity.

Now I want to use roboguice but I do already have a inheritance going on there.

How can I use guice without inheriting from RoboActivity?


Solution

  • Yes, just create own super class and copy into it sth like this:
    https://github.com/rtyley/roboguice-sherlock/blob/master/src/main/java/com/github/rtyley/android/sherlock/roboguice/activity/RoboSherlockActivity.java

    Change only SherlockActivity to BaseActivity.