| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Since AndroidAnnotations 1.0
AndroidAnnotations fully integrates with RoboGuice 1.1.1.
Since AndroidAnnotations 3.1
Since this release RoboGuice 1 support has been dropped in favor of RoboGuice 2.
Since AndroidAnnotations 3.3
Since this release RoboGuice 3 and newer is only supported.
Since AndroidAnnotations 4.0.0
The RoboGuice integration is now split into an AA plugin. To use this functionality, you must add the roboguice plugin to your project.
![]() |
|---|
@EActivity(R.layout.main)
@RoboGuice({AstroListener.class, AnotherListener.class})
public class AstroGirl extends Activity {
@ViewById
EditText edit;
@Inject
GreetingService greetingService;
@Click
void button() {
String name = edit.getText().toString();
greetingService.greet(name);
}
}public class AstroListener {
@Inject
Context context;
public void doSomethingOnResume(@Observes OnResumeEvent onResume) {
Toast.makeText(context, "Activity has been resumed", Toast.LENGTH_LONG).show();
}
}RoboGuice brings the power of the Guice framework to your Android application. It means that you can benefit from dependency injection advantages : low coupling, higher maintainability.
| Back | FazBrowse Home | New Git URL |