Search code examples
androidbackgroundandroid-listviewalpha-transparency

Android ListView alpha in background color only


I have a list view and now all cells have white background.

What I want is to keep the white color in listview's background and put some "alpha" value to make it semi transparent so the user can see the whole view's background.

If I put android:alpha in listview , everything gets alpha ( the content too ). I want the content of the listview to be fully visible and the background color to be semi-transparent. Is there any way to achive this?


Solution

  • Don't use white color as background, define a color in resources that has a transparency, you could do something like #66FFFFFF, this is a transparent white.