AndroidAnnotations——OnActivityResult
2013-12-16 15:34
441 查看
OnActivityResult
Since AndroidAnnotations 2.7This annotation is intended to be used on methods to receive results from an activity started withandroid.app.Activity.startActivityForResult(Intent,
int)
The annotation value must be an integer constant that represents the requestCode associated with the given result.
这个注解用来接收由android.app.Activity.startActivityForResult(Intent,
int)启动的activity的返回值,注解值必须是一个integer常量作为和返回结果相对应的requestCode。
The method may have multiple parameters :
方法可以有多个参数:
A
android.content.Intentthat contains data
returned by the previously launched activity
一个
android.content.Intent参数,包含先前启动的activity返回的数据
An
intor a
java.lang.Integerto
get the
resultCode.
一个
int或者
java.lang.Integer参数,获取
resultCode
Some usage examples of
@OnActivityResultannotation
:
@OnActivityResult注解的一些用例:
@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——OnActivityResult
- android onActivityResult无效或先执行或无回传问题
- Android FragmentActivity onActivityResult冲突问题
- Android Activity的加载模式和onActivityResult方法之间的冲突
- Android onActivityResult
- Android onActivityResult 回调函数
- Android onActivityResult获取返回值的用法
- Android中的onActivityResult和setResult方法的使用
- android onActivityResult不执行问题
- Android实现intent跳转界面传递数据(2)——onActivityResult方法接收返回值
- android-Activity的跳转与传值:startActivityForResult,setResult,onActivityResult
- android 进行拍照操作时对 onActivityResult()的封装隔离
- Android Fragment startActivityForResult没有调用onActivityResult
- 关于Android的Cordova插件plugin OnActivityResult无效的问题
- Android onActivityResult 提前调用,不接收回调解决方法
- Android中的onActivityResult和setResult方法的使用
- Android startActivityForResult()和onActivityResult()的用法
- Android startActivity()和onActivityResult()使用总结
- onActivityResult在android中的用法
- Android onActivityResult和setResult方法详解及使用