0

Draw transparent gradient with alpha transparency from 0 to 1

Hi!

I'm new in android dev and this is my first post. How I can do exactly effect on the link? Around edges fully-transparent.

My app cuts out the image and saves it to a bitmap. I wanted to apply a fade at the edges to not get so bad

I did not want animation. I need around the edges with a fade. maybe blur. Thank you for your help!

Community
  • 1
  • 1

1 Answers1

1

This is a very advanced topic for you considering you're new in android. What you will basically have to do is create a custom class that extends a View and handle adding effects to a Bitmap that's drawn on the screen. Definitely not beginner friendly unless you have some sort of experience in image processing. You may have to search for an Android library that can do these effects for you

But if you have some interest in implementing your own, here are some resources that may get you on your way but I highly doubt they'll be of any use at your skill level:

Community
  • 1
  • 1
mastrgamr
  • 631
  • 1
  • 11
  • 21
  • Thank you for the 2 links but I had read them and not helped. I already have the code ready but I did not understand how to use the mask and PorterDuff mode to merge with the bitmap. Can you post some example for me please? It would be possible? One more time, thank you my friend! – Thiago Lacerda Jul 08 '16 at 17:44