Fragment中使用onActivityResult

在宿主activity中

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    Fragment fm = getSupportFragmentManager().findFragmentByTag("mMyFragment");
    fm.onActivityResult(requestCode, resultCode, data);
    super.onActivityResult(requestCode, resultCode, data);
}

你可能感兴趣的:(Fragment中使用onActivityResult)