title: In Android Elevation/Shadow is not showing when generating Bitmap of a View
body: <p>I'm generating the bitmap of a view to show it as a marker on the Map. It is working fine but the issue that i'm facing is that elevation of the view is not showing. </p>
  
  <pre><code>private Bitmap getMarkerBitmapFromView(View view) {
  
          view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
          view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());
          //view.buildDrawingCache();
          view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
          Bitmap returnedBitmap = Bitmap.createBitmap(view.getMeasuredWidth(), view.getMeasuredHeight(),
                  Bitmap.Config.ARGB_8888);
          Canvas canvas = new Canvas(returnedBitmap);
          /*canvas.drawColor(Color.WHITE, PorterDuff.Mode.SRC_IN);
          Drawable drawable = view.getBackground();
          if (drawable != null)
              drawable.draw(canvas);
          */
          view.draw(canvas);
          return returnedBitmap;
  
      }
  </code></pre>