0

I am having a View and i have placed a background image.Taking the snapshot works fine in this case.

But i setAlpha to make background image semi transparent then snapshot becomes blackish in color depending on how much I am making it Transparent.

How to programmatically take a screenshot in Android? having seen this link but doesn't help much with this case.

Any help?

Community
  • 1
  • 1
Amit Hooda
  • 2,133
  • 3
  • 23
  • 37

1 Answers1

0

if you put an alpha color the screen shot will get a non-color (black) mix on it, always. If you want a screen shot, and keep your alpha, you'll probably have to remove the alpha, wait it to render on the screen, get the screen shot, and then change it back to alpha.

I know cause I've used this before in an application.

Budius
  • 39,391
  • 16
  • 102
  • 144
  • yes its the current way i am doing it but i want alpha the snapshot as well without that black color – Amit Hooda Oct 12 '12 at 13:24
  • I don't think that would be possible. Because the snapshot ends up being of your whole screen, and even thou your layouts might be doing some blending, at the end, what's shown on the screen does not have an alpha. It's the same as doing a snapshot on Windows 7 with those transparent borders, the borders are transparent but the screenshot catches the color from the background. But if you find a way of doing it, let us know. – Budius Oct 12 '12 at 13:33