title: startactivityforresult() inside a listener not calling onActivityResult()
body: <p>I know there are many similar questions on SO, but none of them resolved my issue.</p>
  
  <p>I am calling startActivityForResult inside a seekbar listener. However, onActivityResult is not getting called. Here is my code. What could be going wrong?</p>
  
  <pre><code>public class PeopleActivity extends SherlockFragment {
  
  @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
      volumeControl.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
              int progressChanged = 0;
  
              @Override
              public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
                  progressChanged = progress;
              }
  
              @Override
              public void onStartTrackingTouch(SeekBar seekBar) {
  
              }
  
              @Override
              public void onStopTrackingTouch(SeekBar seekBar) {
  
  
                  Intent in = new Intent(getActivity(), com.mytest.mytestninja.RangingActivity.class);
                  getActivity().startActivityForResult(in, 1);
  
  
              }
  
          });
  
  
  }
  @Override
      public void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
  
          rangeValue.setText("CALLED");
      }
  
  }
  </code></pre>
  
  <p><strong>RangingActivity.java</strong></p>
  
  <pre><code>public class RangingActivity extends Activity
  @Override
      protected void onCreate(Bundle savedInstanceState) {
  
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_ranging);
  
              Intent returnIntent = new Intent();
              returnIntent.putExtra("result", firstBeacon.toString());
              setResult(RESULT_OK, returnIntent);
              finish();
   }
  }
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Activity in which PeopleActivity fragment is used :</p>
  
  <pre><code>public class DrawerFrontActivity extends SherlockFragmentActivity {
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          bar = getSupportActionBar();
          Drawable myIcon = getResources().getDrawable( R.drawable.bluebar);
          bar.setBackgroundDrawable(myIcon);
  
          SherlockFragment fragment;
          fragment = new PeopleActivity();
  
          FragmentTransaction transaction =    getSupportFragmentManager().beginTransaction();
          transaction.replace(R.id.rlDrawerHome, fragment);       
          transaction.commit();
  
          setTitle("Home");
          bar.setTitle("Home");
  }
  }
  </code></pre>