title: Sherlock ActionBar onActivityResult not called in Fragment
body: <p>In my app I have a SherlockFragmentActivity which is hosting an actionbar with 4 tabs. Each of the tabs is a SherlockFragment. Calling a normal Activity from one of the tabs (let's say Tab1) is working fine with startActivityForResult(myIntent1, 0);</p>
  
  <p>But my onActivityResult in Tab1 is never called.
  After reading lots of topics I understood that onActivityResult of my main activity is called first, which indeed is. But I can't get the values beeing past to the onActivityResult of my fragment.</p>
  
  <p>Here is my code...</p>
  
  <p>Main Activity:</p>
  
  <pre><code>public void onActivityResult(int requestCode, int resultCode, Intent data) {
      Fragment mFragment = Fragment.instantiate(this, Tab1.class.getName());
      mFragment.onActivityResult(requestCode, resultCode, data);
      super.onActivityResult(requestCode, resultCode, data);
  }
  </code></pre>
  
  <p>Also tried it with super call in line one and without super call.</p>
  
  <p>Fragment:</p>
  
  <pre><code>public void onActivityResult(int requestCode, int resultCode, Intent data){
      //super.onActivityResult(requestCode, resultCode, data);
      Toast.makeText(context, String.valueOf(requestCode), Toast.LENGTH_SHORT).show();
  
      if(requestCode == 0) {
          if(resultCode == Activity.RESULT_OK) {
              //do some stuff here
          }
      }
  }
  </code></pre>
  
  <p>Also tried with super call at the beginning and at the end.</p>
  
  <p>Everytime I get the same error:</p>
  
  <pre><code>09-09 14:33:34.230: E/AndroidRuntime(7408): FATAL EXCEPTION: main
  09-09 14:33:34.230: E/AndroidRuntime(7408): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65536, result=-1, data=null} to activity {com.BlubBlub.TimeMate/com.BlubBlub.TimeMate.TimeMateActivity}: java.lang.NullPointerException
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at android.app.ActivityThread.deliverResults(ActivityThread.java:3267)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at android.app.ActivityThread.handleSendResult(ActivityThread.java:3310)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at android.app.ActivityThread.access$1100(ActivityThread.java:142)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at android.os.Handler.dispatchMessage(Handler.java:99)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at android.os.Looper.loop(Looper.java:137)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at android.app.ActivityThread.main(ActivityThread.java:4930)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at java.lang.reflect.Method.invokeNative(Native Method)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at java.lang.reflect.Method.invoke(Method.java:511)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at dalvik.system.NativeStart.main(Native Method)
  09-09 14:33:34.230: E/AndroidRuntime(7408): Caused by: java.lang.NullPointerException
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at android.widget.Toast.&lt;init&gt;(Toast.java:92)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at android.widget.Toast.makeText(Toast.java:238)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at com.BlubBlub.TimeMate.Tab1.onActivityResult(Tab1.java:125)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at com.BlubBlub.TimeMate.TimeMateActivity.onActivityResult(TimeMateActivity.java:150)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at android.app.Activity.dispatchActivityResult(Activity.java:5192)
  09-09 14:33:34.230: E/AndroidRuntime(7408):     at android.app.ActivityThread.deliverResults(ActivityThread.java:3263)
  </code></pre>
  
  <p>What is the correct way to get this to work? I'm really desperate by now...</p>