How can I make a screenshot from a textview background? in JPEG.
Asked
Active
Viewed 66 times
1 Answers
0
You can ask the view to draw itself on a canvas. That's probably the simplest method.
Bitmap b = Bitmap.createBitmap(targetView.getWidth(),
targetView.getHeight(),
Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
targetView.draw(c);
See http://arpitonline.com/blog/2012/07/17/capturing-bitmaps-of-views-in-android/

matiash
- 54,791
- 16
- 125
- 154