fragment通过路由跳转activity时,获取不到activity返回的数据
例如:
JumpManager.getInstance().jumpActivity(detailRequest).navigation(getActivity(), Constants.REQUEST);
这种就在onActivityResult里就获取不到数据,也不走onActivityResult
用下边这种形式
fragmentNavigation(JumpManager.getInstance().jumpActivity(detailRequest,), Constants.REQUEST);
public void fragmentNavigation(Postcard postcard, int requestCode) {
LogisticsCenter.completion(postcard);
Intent intent =new Intent(getActivity(), postcard.getDestination());
intent.putExtras(postcard.getExtras());
startActivityForResult(intent, requestCode);
}
就可以了