Is there a transparent color code?

iBEK picture iBEK · Nov 28, 2017 · Viewed 30k times · Source

I'm looking for my actionBar to be transparent. I only have searchView in it and it's in my MapActivity, I just want the searchView and the "back pressed" buttons to be visible. Which transparency # code do I use to fill into the following:

 getSupportActionBar().setBackgroundDrawable(new ColorDrawable(parseColor("#")));  

Answer

Saheb Roy picture Saheb Roy · Nov 28, 2017

Android supports the #AARRGGBB color format.

A = alpha, R = Red, G = Green, B = Blue

To make some View transparent use #00000000.
First 00 are alpha.