I want to make an image transparent in android, so I did some research but came to the conclusion that I did'nt really get it. So I am drawing A couple of bitmaps on my canvas, and in 1 kind of bitmap I want to make the red transparent. i found A piece of code but I doesn't really do anything. this is my code:
if(PictureArray[a]==0){
Paint Remove = new Paint();
Remove.setARGB(255, 255, 0, 0);
int removeColor=Remove.getColor();
Remove.setAlpha(0);
Remove.setXfermode(new AvoidXfermode(removeColor,0,AvoidXfermode.Mode.TARGET));
c.drawBitmap(Stone, x, c.getHeight()/2, null);
}