i am new to roboguice
i have been looking at their documentations i get the idea
yes, instead of saying
findViewById, i can just do @InjectView, etc
but what is the purpose of extending their classes, such as RoboAcitivy, or RoboFragment etc etc? i mean what is the benefit of that? I still don’t see it.
please helo
I highly recommend you to look at RoboActivity class. Then, I think, it would be clear for you.
Roboguice is using annotations to know what and where to inject instances. This is done in
Injectorwhich must be invoked somewhere. Roboguice creators decided to run it inActivity.onCreate()method. ThereforeActivityis extended toRoboActivtywhich adds toonCreate()code such this below:Injector will detect annotated fields and inject instances.