org.androidannotations.annotations
Annotation Type RoboGuice


@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();
        }
 }
 

See Also:
RoboGuiceIntegration

Optional Element Summary
 Class<?>[] value
          The RoboGuice listener classes to bind to this activity.
 

value

public abstract Class<?>[] value
The RoboGuice listener classes to bind to this activity. Will add an injected listener field to the subclass.

Default:
{}


Copyright © 2010-2014. All Rights Reserved.