title: Having problem in Greating QrCodes in bulk and saving them with custom layout
body: <p>I'm trying to bulk generate and save Qrcodes with custom layouts from a data base.</p>
  
  <p>The loop I created works, it saves in bulk. But the problem is when saving in bulk, Information that should be fetched from database and displayed are not showing up, <strong>only</strong> qrcode shows up. But if I save Manually one by one, All information shows up.</p>
  
  <p><a href="https://i.stack.imgur.com/dqxYB.jpg" rel="nofollow noreferrer">Saving manually</a>
  <a href="https://i.stack.imgur.com/boTeQ.png" rel="nofollow noreferrer">Saving in bulk</a></p>
  
  <p>Code For saving layout:</p>
  
  <pre class="lang-java prettyprint-override"><code>@RequiresApi(api = Build.VERSION_CODES.N)
  public void screen(String name) {
      try {
          CardView content = findViewById(R.id.massgenrate);
          content.setDrawingCacheEnabled(true);
          Bitmap bitmap = content.getDrawingCache();
          SimpleDateFormat formatter = new SimpleDateFormat("yyyy_MM_dd_hh_mm_ss");
          Date now = new Date();
          String fileName = formatter.format(now);
  
          File file, f;
  
          if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
              file = new File(Environment.getExternalStorageDirectory(), "DCIM");
              if (!file.exists()) {
                  file.mkdirs();
              }
              f = new File(file.getAbsolutePath() + file.separator + name + fileName + ".png");
  
              FileOutputStream ostream = new FileOutputStream(f);
              bitmap.compress(Bitmap.CompressFormat.PNG, 10, ostream);
              Toast.makeText(this, "done", Toast.LENGTH_SHORT).show();
              ostream.close();
          }
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>Code For loop:</p>
  
  <pre class="lang-java prettyprint-override"><code>public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
      if (dataSnapshot.exists()) {
  
          for (DataSnapshot snapshot : dataSnapshot.getChildren()) {
              userinfo dbb = snapshot.getValue(userinfo.class);
  // sets Text for textviews
              name.setText(dbb.getFirstname() + " " + dbb.getLastname());
              work.setText(dbb.getWorkplace());
              occu.setText(dbb.getOccupation());
  // email garbed from the db is sent to qrGenrator tp create the code. 
              qrGenrator(dbb.getEmail());
              progressBar.setVisibility(View.INVISIBLE);
              creating.setText(" ");
  //sends firstname to screen function which saves the file with persons firstname
              screen(dbb.getFirstname);
          }
      }
  }
  </code></pre>