Using RoboGuice 4 without injectMembers() in each activity

100 views Asked by At

I am getting started with RoboGuice 4. Following the example in github I created the Module file, registered it in AndroidManifest.xml and created some interface and implementation. Also added the code to MainActivity:

override onCreate( ..
    RoboGuice.setupBaseApplicationInjector(application)
    RoboGuice.getInjector(this).injectMembers(this)

It all works well, but does this mean I have to add this code everywhere I use @Inject? Is there any way to avoid it?

0

There are 0 answers