Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set AutoCompleteTextView drop down background to transparent in Android?

As the subject suggests , how to set the transparent background to AutoCompleteTextView dropdown. I can apply any style to the view(TextView) that dropdown box shows but to make the drop down itself transparent I am not able to do !

Any hints or solution ?

Thanks

like image 377
sat Avatar asked Mar 03 '11 13:03

sat


2 Answers

Thanks , got what I was looking for , I can change background image of dropdown using setDropDownBackgroundResource(); and set semi-transparent png.

like image 77
sat Avatar answered Oct 11 '22 23:10

sat


You have two options:

XML Attribute:

android:popupBackground

The background to use for the popup window. May be a color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb".

Java Attribute

setDropDownBackgroundResource

Sets the background of the auto-complete drop-down list.

like image 32
d.danailov Avatar answered Oct 11 '22 23:10

d.danailov