1

I am working on an app in which I have some edit texts and background image. I wrote something in that edit text, I want to save whole current screen as an image, so that I can send it via email. I got a solution using ASL(android screenshot library) but for this I have to start native service on my device every time when I reboot it. So is there any other solution to take screenshot of current screen?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Vikasdeep Singh
  • 20,983
  • 15
  • 78
  • 104

1 Answers1

2

Try this.. find the Parent layout in you xml and do this.

  LinearLayout ll = (LinearLayout )findViewById(R.id.layout);
     ll .setDrawingCacheEnabled(true);
     Bitmap bm = v1.getDrawingCache();
Sujit
  • 10,512
  • 9
  • 40
  • 45