Repository navigation
FragmentArg
pyricau edited this page Oct 30, 2012
·
5 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 was originally sponsored by eBusinessInformations.
10/07/2015 The 3.3.2 release is out !
- Get started!
- Download
- Cookbook, full of recipes
- Customize annotation processing
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow
- Ask on Gitter