In my layout, I have two rectangular semi-transparent views in the following configuration:
---------------------|
| | B |
| -------------|
| A |
| |
| |
| |
| |
| |
--------
To make it look nicer, I want to round off the bottom right corner of A and add a curve in the corner where A to B meet like this:
---------------------|
| |
| ------------|
| /
| |
| |
| |
| |
| |
| |
|------/
Can anyone suggest a way I can do this, preferably without having to use bitmaps (as this means I can change the colors and corner sizes more easily later)?
I know how to round A by itself using a rectangular background drawable and clipping, but I can’t think of a nice way to add the corner joining A and B.
If A and B are in a relative layout, you could add a small C view right in the corner, below and left aligned to B, and have it draw the rounding in onDraw().
edit:
in API Demos -> Graphics -> Xfermodes there’s an example of how you could draw something with a circle cut out of it (but I have no experience with that).