@Retention(value=CLASS)
@Target(value=PARAMETER)
public static @interface OnActivityResult.Extra
Use on any native, Parcelable
or Serializable
parameter of an
OnActivityResult
annotated method to bind it with the value from the Intent.
The annotation value is the key used for the result data. If not set, the field name will be used as the key.
Some usage examples of @Result annotation:@OnActivityResult(REQUEST_CODE) void onResult(int resultCode, Intent data, @Extra String value) { } @OnActivityResult(REQUEST_CODE) void onResult(int resultCode, @Extra(value = "key") String value) { } @OnActivityResult(REQUEST_CODE) void onResult(@Extra String strVal, @Extra int intVal) { }
Activity.onActivityResult(int, int, Intent)
,
OnActivityResult
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
value |
Copyright © 2010-2014. All Rights Reserved.