startActivityForResult的坑
作者:互联网
问题:在fragment中startActivityForResult(msgIntent, Const.JumpRequestCode.REQUEST_MODIFY_CUSTOMER_MSG);然后在宿主activity中onActivityResult(int requestCode, int resultCode, Intent data),我们需要根据requestCode做不同处理,然而这里的requestCode怎么也不是我请求时的
Const.JumpRequestCode.REQUEST_MODIFY_CUSTOMER_MSG。
解决:在fragment中要getActivity().startActivityForResult(msgIntent, Const.JumpRequestCode.REQUEST_MODIFY_CUSTOMER_MSG);
标签:CUSTOMER,Const,MODIFY,JumpRequestCode,requestCode,MSG,startActivityForResult 来源: https://blog.csdn.net/yufumatou/article/details/116801650