|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=CLASS) @Target(value=METHOD) public @interface OnActivityResult
This annotation is intended to be used on methods to receive results from a
previously started activity using
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 parameter :Some usage examples of @OnActivityResult annotation:
- A android.content.Intent that contains data
- An int or an java.lang.Integer to get the resultCode
@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() {
}
Activity.startActivityForResult(Intent, int),
Activity.onActivityResult(int, int, Intent)| Required Element Summary | |
|---|---|
int |
value
|
| Element Detail |
|---|
public abstract int value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||