Taking screenshot containing custom view
<p>I want to add a feature to an app that takes a screenshot and then allows you to send it (by email etc). I read this this thread:
<a href="http://stackoverflow.com/questions/3107527/android-save-view-to-jpg-or-png">Android save view to jpg or png</a>
and the answer works perfectly. </p>

<p>However, when I set the top level linear layout as the view, the image contains everything correctly apart from my custom view, which it just draws as a black square. My custom view is an extension of surface view, the onDraw method is being called from a thread.</p>

<p>Does anyone know if there is a way to make this work?</p>
