title: capture bitmap from view android
body: <p>I have posted same question but it's in near to my problem that's why i have posted it second time</p>
  
  <p>Hi i want to capture image from RelativeLayout, for that i have used below code </p>
  
  <pre><code>   captureRelativeLayout.setDrawingCacheEnabled(true);
     bitmap = captureRelativeLayout.getDrawingCache(true).copy(
                  Config.ARGB_8888, false);
  </code></pre>
  
  <p>the problem is that when i start activity and get image from that view at that time it will work fine, but if i use it second time, the image is not being refreshed, means that previous bitmap is every time i getting.</p>
  
  <p>Now if i close my activity and agian start it then i will get updated image but again not in second time
  :( for more information look at the
  <a href="https://stackoverflow.com/questions/22091089/cant-share-image-properly-android">can&#39;t share image properly android</a></p>