wrong requestcode when using startActivityForResult

You are calling startActivityForResult() from your Fragment. When you do this, the requestCode is changed by the Activity that owns the Fragment.

If you want to get the correct resultCode in your activity try this:

Change:

startActivityForResult(intent, 1);

To:

getActivity().startActivityForResult(intent, 1);
 
posted @ 2016-04-12 09:39  wen_dao_  阅读(161)  评论(0编辑  收藏  举报