title: Get bitmap from imageview in viewpager with glide
body: <p>I'm showing in imageview with glide. User can save image on button click.</p>
  
  <pre><code>Bitmap bitmap = ((BitmapDrawable)imageViewPreview.getDrawable()).getBitmap();
  </code></pre>
  
  <p>when i use this code it save whole screen image(Image and black space).</p>
  
  <pre><code>    imageViewPreview.setDrawingCacheEnabled(true);
      imageViewPreview.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
              View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
      imageViewPreview.layout(0, 0,
              imageViewPreview.getMeasuredWidth(), imageViewPreview.getMeasuredHeight());
      imageViewPreview.buildDrawingCache(true);
      Bitmap bitmap = Bitmap.createBitmap(imageViewPreview.getDrawingCache());
      imageViewPreview.setDrawingCacheEnabled(false);
  </code></pre>
  
  <p>when is use this, sometime it work but image get cropped in half or image go to up like <strong>"android:layout_alignParentTop="true"</strong>.</p>