androidtransparencybackground-colorandroid-drawablecolor-codes

Is there a transparent color code?


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("#")));  

Solution

  • 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.