title: get zxing data into swipe view fragment
body: <p>I am using zxing in a fragment of viewpager tab. I can call zxing with Intent and read the QR code but I can't get result to a edittext.</p>
  
  <p>This is where i create tab in FragmentPagerAdapter:</p>
  
  <pre><code>@Override
      public Fragment getItem(int i) {
          switch (i) {
          case 0:
              return new Tab1();
          case 1:
              return new Tab2();
          default:
              return new EmptyTab();
          }
      }
  </code></pre>
  
  <p>And my <strong>Tab1</strong> class:</p>
  
  <pre><code>public class Tab1 extends Fragment {
  @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.tab_1, container, false);
          IDEditText = (EditText) rootView.findViewById(R.id.fttx_id_editText);
  
          Button scanBarcode = (Button) rootView.findViewById(R.id.scan_barcode);
  
          scanBarcode.setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View v) {
                  IntentIntegrator scanIntegrator = new IntentIntegrator(getActivity);
                  scanIntegrator.initiateScan();
              }
          });
  
          return rootView;
      }
  
  
  
      @Override
      public void onActivityResult(int requestCode, int resultCode, Intent intent) {
          // retrieve scan result
          IntentResult scanningResult = IntentIntegrator.parseActivityResult(
                  requestCode, resultCode, intent);
          if (scanningResult != null) {
              // we have a result
              String scanContent = scanningResult.getContents();
              IDEditText .setText("CONTENT: " + scanContent);
          } else {
              Toast.makeText(getActivity(),
                      "No scan data received!", Toast.LENGTH_SHORT).show();
          }
      }
  </code></pre>
  
  <p>zxing starts; then reads; then ends; but with no scan data: I think 'onActivityResult' never starts :(</p>
  
  <p>How can i use zxing in this fragment?</p>