@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.
If Parceler is on the classpath, extras
annotated with @Parcel, or collections supported by Parceler will be
automatically marshaled using a Parcelable
through the Parcels utility class.
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, @OnActivityResult.Extra String value) {
}
@OnActivityResult(REQUEST_CODE)
void onResult(int resultCode, @OnActivityResult.Extra(value = "key") String value) {
}
@OnActivityResult(REQUEST_CODE)
void onResult(@OnActivityResult.Extra String strVal, @OnActivityResult.Extra int intVal) {
}
Activity.onActivityResult(int, int,
android.content.Intent),
OnActivityResultpublic abstract String value
Copyright © 2010–2016 simpligility technologies inc.. All rights reserved.