Here is an image of what I need:
https://i.sstatic.net/y4XPe.jpg I need to go from 1 to 2 and it has to be one programatically no xml.
//Create transparent circle
RadialGradient gradient = new android.graphics.RadialGradient(newBitmap.getWidth() / 2,newBitmap.getHeight() / 2, newBitmap.getWidth() - newBitmap.getWidth() / 2, 0x00000000, 0xFF000000, android.graphics.Shader.TileMode.CLAMP);
Figured this out,
//Create transparent circle
int[] Colors = {0x00000000, 0xFF000000};
float[] ColorPosition = {0.60f, 0.99f};
RadialGradient gradient = new android.graphics.RadialGradient(newBitmap.getWidth() / 2,newBitmap.getHeight() / 2, newBitmap.getWidth() - newBitmap.getWidth() /2, Colors, ColorPosition, android.graphics.Shader.TileMode.CLAMP);
Where the colour positions are the percentage positions of the colours above (Can have many as you want)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With