Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
nested fragment's onActivityResult is not called.

@Override public void startActivityForResult(final Intent _intent, final int _requestCode) { final FragmentManager fragmentManager = getActivity().getSupportFragmentManager();

final Fragment f = new Fragment() {
	public void onAttach(Context context) {
		startActivityForResult(_intent, _requestCode);

	public void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
		if (_requestCode == requestCode) {
			ThisFramgnet.this.onActivityResult(requestCode, resultCode, data);
fragmentManager.beginTransaction().add(f, null).commit();


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment