5

I would like to use RoboActivity with my activity, but I don't know how to do that coz my current activity extends already ActionBarActivity:

public class MainActivity extends ActionBarActivity 

Thank you so much

anthony
  • 7,653
  • 8
  • 49
  • 101

2 Answers2

6

For RoboGuice 3 simply extend from RoboActionBarActivity.

Leandro Glossman
  • 363
  • 4
  • 10
3

You can simply copy the relevant RoboActivity parts into your subclass of ActionBarActivity. From the official docs https://github.com/roboguice/roboguice/wiki/Using-your-own-BaseActivity-with-RoboGuice:

In case your base activity class already extends a different library, the best way to get all the power of RoboGuice is to copy all the code contained in RoboActivity.

An example is also provided therein.

Kevin
  • 702
  • 7
  • 22