title: Android QR Scanner: How to quit ZXingScannerView.ResultHandler to get back to where I came from
body: <p>In my first steps in exploring Android I now start with QR scanning.</p>
  
  <p>Works all pretty well. But I am not able to come back from the ResultHandler after read the QR successfully to my MainActivity.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity implements        
          ZXingScannerView.ResultHandler
  {
  
    private ZXingScannerView mScannerView
    ....
  
    @Override
    public void handleResult(Result rawResult)
    {
     // my results are ok in rawResult
     // the scanner does not scan anymore but it is still there
  
     // how to go back to my main activity???
    }
  
    public void ClickButton (View view)
    {
         mScannerView = new ZXingScannerView(this);   
  
         setContentView(mScannerView);
         mScannerView.setResultHandler(this);
         mScannerView.startCamera();         
     }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I tried </p>
  
  <pre><code>mScannerview.stopCameraPreview
  
  mScannerView.stopCamera
  
  this.finish
  
  setContentView(R.layout.activity_main);  // shows my activity_main 
               // but I can not click anything
  </code></pre>
  
  <p>Thanks!!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I added some code to describe it a bit better. The idea is from </p>
  
  <p><a href="https://www.numetriclabz.com/android-qr-code-scanner-using-zxingscanner-library-tutorial/" rel="nofollow noreferrer">https://www.numetriclabz.com/android-qr-code-scanner-using-zxingscanner-library-tutorial/</a></p>