I am trying to take a screen shot of whatever is drawn on my custom view's canvas. I use the following lines for the same:
//enable drawing cache this.setDrawingCacheEnabled(true); // use the drawing on the cache to create a Bitmap Object Bitmap screenshot = Bitmap.createBitmap(this.getDrawingCache()); // disable the cache this.setDrawingCacheEnabled(false); Problem: The getDrawingCache() call returns null sometimes. Any pointers to what I am doing wrong here? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

