forked from androidannotations/androidannotations
-
Notifications
You must be signed in to change notification settings - Fork 0
OnActivityResult
pyricau edited this page Oct 29, 2012
·
7 revisions
Since AndroidAnnotations 2.7
This annotation is intended to be used on methods to receive results from an activity started with android.app.Activity.startActivityForResult(Intent, int)
The annotation value must be an integer constant that represents the requestCode associated with the given result.
The method may have multiple parameters :
- A
android.content.Intentthat contains data returned by the previously launched activity - An
intor ajava.lang.Integerto get theresultCode.
Some usage examples of @OnActivityResult annotation :
@OnActivityResult(REQUEST_CODE)
void onResult(int resultCode, Intent data) {
}
@OnActivityResult(REQUEST_CODE)
void onResult(int resultCode) {
}
@OnActivityResult(ANOTHER_REQUEST_CODE)
void onResult(Intent data) {
}
@OnActivityResult(ANOTHER_REQUEST_CODE)
void onResult() {
}AndroidAnnotations was created by Pierre-Yves Ricau and is sponsored by eBusinessInformations.
04/03/2013 The 2.7.1 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