You must specify an alpha channel (= transparency channel) for your resources.
If you use a standard color in your XML-res (for example, from your .xml color) to fill the background, you can specify alpha by changing the first two numbers. Example format:
<color name="transparent_red">#99FF0000</color>
Here 99 indicates the alpha value, change it to FF, you will get a solid red color by changing it to 00, making the whole color invisible. Just check this by changing the value between them.
See here for more details.
If you want to use the actual image / bitmap, for example, you need to create PNG images with the specified alpha channel. It depends on what software you use to create the bitmap images. I recommended vector graphics programs like Illustrator or Inkscape for this, they have alpha value when you specify the color. Once you have created it, export the PNG image and add it to your resources.
user658042
source share