CopyPastor

Detecting plagiarism made easy.

Score: 0.9699862784352796; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2020-03-26
by hamid keyhani

Original Post

Original - Posted on 2011-05-27
by Spidy



            
Present in both answers; Present only in the new answer; Present only in the old answer;

The hosting activity overrides `onActivityResult()`, but it did not make a call to `super.onActivityResult()` for unhandled result codes. Apparently, even though the fragment is the one making the `startActivityForResult()` call, the activity gets the first shot at handling the result. This makes sense when you consider the modularity of fragments. Once I implemented `super.onActivityResult()` for all unhandled results, the fragment got a shot at handling the result.
Check this out:
https://stackoverflow.com/questions/6147884/onactivityresult-is-not-being-called-in-fragment][1]
I hope to be useful for u :)
The hosting activity overrides `onActivityResult()`, but it did not make a call to `super.onActivityResult()` for unhandled result codes. Apparently, even though the fragment is the one making the `startActivityForResult()` call, the activity gets the first shot at handling the result. This makes sense when you consider the modularity of fragments. Once I implemented `super.onActivityResult()` for all unhandled results, the fragment got a shot at handling the result.
And also from @siqing answer:
To get the result in your fragment make sure you call `startActivityForResult(intent,111);` instead of `getActivity().startActivityForResult(intent,111);` inside your fragment.

        
Present in both answers; Present only in the new answer; Present only in the old answer;