you can also add below code in AndroidManifest.xml.
It will work fine.
But I found that this gives a problem as the launcher icon also become transparent.
So I used:
and it worked fine.
But if you are having more than one activity and want to make the icon on an activity transparent then the previous approach will work.