forked from androidannotations/androidannotations
-
Notifications
You must be signed in to change notification settings - Fork 0
FragmentArg
pyricau edited this page Oct 30, 2012
·
4 revisions
Since AndroidAnnotations 2.7
The @FragmentArg annotation indicates that a fragment field should be injected with the corresponding Fragment Argument.
If you do not provide any value for the @FragmentArg annotation, the name of the field will be used.
Usage example:
@EFragment
public class MyFragment extends Fragment {
@FragmentArg("myStringArgument")
String myMessage;
@FragmentArg
String anotherStringArgument;
@FragmentArg("myDateExtra")
Date myDateArgumentWithDefaultValue = new Date();
}The fragment builder will hold dedicated methods for these arguments:
MyFragment myFragment = MyFragment_.builder()
.myStringArgument("Hello")
.anotherStringArgument("World")
.build();AndroidAnnotations was created by Pierre-Yves Ricau and is sponsored by eBusinessInformations.
04/11/2012 The 2.7 release is out
- Get started!
- Download
- Cookbook, full of recipes
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow