0

I want to create control buttons for music player.My requirement is ,the buttons should be transparent. Means parent background should be visible through buttons. Please tell me how to do it.Which widget I should use? Below is the image of my requirement.

Image is as below enter image description here

Dexter
  • 1
  • 2

2 Answers2

0

Set the property "alpha" of button between 0 and 1, where 0 is invisible and 1 visible:

<Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="New Button"
                android:id="@+id/button"
                android:layout_gravity="center_horizontal|bottom"
                android:alpha="0.5" />
MikeOx
  • 167
  • 1
  • 1
  • 16
0
    please check below link and use to set like below
    http://stackoverflow.com/questions/15852122/hex-transparency-in-colors

    <Button
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="New Button"
          android:id="@+id/button"
          android:background="#E6FFFFFF"  
        android:alpha="0.5" /> 


// here E6 is alpha code
// and i set it for white color(FFFFFF)            
ViratBhavsar
  • 104
  • 4