|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=CLASS) @Target(value=TYPE) public @interface RoboGuice
Should be used on Activity classes that use the RoboGuice framework.
Example :@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(); } }
Optional Element Summary | |
---|---|
Class<?>[] |
value
The RoboGuice listener classes to bind to this activity. |
public abstract Class<?>[] value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |