title: Generate QR Code directly into ImageView?
body: <p>I am generating a QR code with ZXing library in an Android app.</p>
  <p>Instead of directly saving it into a file, I want it to go into an ImageView.</p>
  <p>Here is my code:</p>
  <pre><code>String WIFIQRCODE = &quot;&quot;;
  String SSID = etSSID.getText().toString();
  String PASS = etPASS.getText().toString();
  String PASSTYPE = sTYPE.getSelectedItem().toString();
  WIFIQRCODE =   &quot;WIFI:T:&quot;+PASSTYPE+&quot;;S:&quot;+SSID+&quot;;P:&quot;+PASS;
  //Inform the user the button1 has been clicked
  QRCodeWriter writer = new QRCodeWriter();
  BitMatrix bitMatrix = null;
  try {
      bitMatrix = writer.encode(WIFIQRCODE, BarcodeFormat.QR_CODE, 300, 300);
      File file = new File(context.getFilesDir(), &quot;/sdcard/Images/&quot;+SSID+&quot;.png&quot;);
      MatrixToImageWriter.writeToFile(bitMatrix, &quot;png&quot;, file);
  
  } catch (WriterException e){
      e.printStackTrace();
  } catch (IOException e){
      e.printStackTrace();
  }
  </code></pre>
  <p>How to modify it, so that it puts it into an ImageView instead of a file?</p>