@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(); } }
public abstract Class<?>[] value
Copyright © 2010-2015. All Rights Reserved.