-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
need some more tutorials #3
Comments
This retains the annotated value over destroy/create cycles with a saved instance state (i.e. when the device is rotated or when the app is "shut down" temporarily because another app has come to the foreground).
This retains the value of the annotated field permanently. It means the value is stored in the shared preferences when an activity or fragment is destroyed and it's loaded from the shared preferences when the activity or fragment is created. This is useful to restore the last value of this field after the activity or fragment has been closed completely. Of course it also covers the previous case. This can be done per instance. So if you have multiple instances of the same fragment (i.e. like in a pager) you can add the parameter
This initializes the annotated field with the value of an extra (in case of an activity) or the argument (in case of a fragment) of the same key. That happens when the activity or fragment are created for the first time (i.e. without saved instance state). but not when it's recreated with a saved instance state (i.e. when the device is rotated). Let me know if you have any other questions. Or check out our task app or color picker. You can find more examples in there. |
Also check out the example application and monitor the values. You'll see that some are retained when you close the app and others will only be retained when you rotate the device. |
I think I have the basic grasp of the idea on how to use it now. |
Great! If you any feature requests, please don't hesitate to tell us. |
How does it allow combination of extra parameters take control in the annotation such as |
You mean what the effect of these extra parameter is? |
in some reason i am not totally understand
these meaning.. what are the differences here.
The text was updated successfully, but these errors were encountered: