org.androidannotations.annotations
Annotation Type FragmentArg


@Retention(value=CLASS)
@Target(value=FIELD)
public @interface FragmentArg

Use on any native, Parcelable or Serializable field in an EFragment annotated class to bind it with Android's arguments.

The annotation value is the key used for argument. If not set, the field name will be used as the key.

When FragmentArg is used, the intent builder will hold dedicated methods for each annotated fields.

Your code related to injected extra should go in an AfterInject annotated method.

Example :
 @EFragment
 public class MyFragment extends Fragment {
 
        @FragmentArg
        String myMessage;
 }
 
 @EActivity
 public class MyActivity extends Activity {
 
        @AfterViews
        void init() {
                MyFragment myFragment = MyFragment_.builder() //
                                .myMessage("Hello") //
                                .build();
        }
 }
 

See Also:
EFragment, FragmentById, FragmentByTag

Optional Element Summary
 String value
           
 

value

public abstract String value
Default:
""


Copyright © 2010-2014. All Rights Reserved.