Reputation: 205
I would like to set a custom part of an image view to be transparent. However, the partial view inside does not have to be a rectangle. It could be parallelogram, triangle, etc... I know I can retrieve the corners of the shape that I want to set to transparent, I just don't know what to do with those inputs.
Any help is appreciated!
Upvotes: 0
Views: 557
Reputation: 28599
You will have to manually manipulate a bitmap that you set to the image view.
Bitmap someBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.someimage);
bmp.setPixel(x,y,Color.TRANSPARENT);
someImageView.setBitmap(someBitmap);
Code not tested.
Upvotes: 1