title: Capturing the snapshot of the Relative layout with transparent background gives a bitmap with black background not transparent
body: <p>I have a Relative layout with transparent background which contains images,text etc when i capture its bitmap by using Drawing cache or canvas the transparent color get converted to black i have tried lots of means but no success...</p>
  
  <pre><code>rl_mainCanvesLayout.setDrawingCacheBackgroundColor(Color.TRANSPARENT);
  Bitmap bitmap =Bitmap.createBitmap(rl_mainCanvesLayout.getDrawingCache());
  rl_mainCanvesLayout.setDrawingCacheEnabled(false);
  Bitmap bitmap = Bitmap.createBitmap(rl_mainCanvesLayout.getDrawingCache());
  
  private String savebitmap(Bitmap bitmap, String filename) {
      String dir = Environment.getExternalStorageDirectory() + File.separator  + "abc";
      File file_dir = new File(dir);
      file_dir.mkdir();
      FileOutputStream outStream = null;
      File file = new File(dir, filename + ".jpg");
      if (file.exists()) {
          file.delete();
          file = new File(dir, filename + ".jpg");
          Log.e("file exist", "" + file + ",Bitmap= " + filename);
      }
      try {
          outStream = new FileOutputStream(file);
          bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outStream);
          outStream.flush();
          outStream.close();
  
      } catch (Exception e) {
          e.printStackTrace();
  
      }
      Log.e("file", "" + file);
      return file.toString();
  
  }
  </code></pre>