Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting alpha transparency at a listView android

Hi i would like to set some transparency to my listview , i've alredy see some examples of that , but all of than were a 100% transparent .

as this topic : How to make the ListView transparent in android?

As Jacky mentioned, setting attributes for list view will do the job.

android:background="#00000000"
android:cacheColorHint="#00000000"

But in my case i just want to make it half transparent , some sort of alpha 50 and stuff. My goal here is that the user could see the background of the UI through listview but also see the background of my listView with a bit of transparecy.

How can i achieve that ?

Thanks.

like image 393
user569873 Avatar asked Nov 30 '22 09:11

user569873


1 Answers

If I recall correctly, first two digits from #00000000 are for alpha channel.

Something like #80XXXXXX will be 50% transparency.

You can refer Color State List for further explanation.

like image 117
Kiril Kirilov Avatar answered Dec 10 '22 13:12

Kiril Kirilov