Android Spinner - How to make dropdown view transparent? Android Spinner - How to make dropdown view transparent? android android

Android Spinner - How to make dropdown view transparent?


You can override the style for the dropdown, and the dropdown item by using a Theme in your app that inherits from one of the Android themes, then override the

android:dropDownSpinnerStyle, or android:spinnerDropDownItemStyle, and even the android:dropDownListViewStyle attribute of the theme, pointing to your own custom style instead of the Android style that is defined in their theme. I created a fully customized spinner this way, with a transparent button AND dropdown. I even got rid of the dropdown list dividers, and set my own spacing for the dropdown items when I built the tablet app for Fandango (take a look at the sort movies spinner on the main page of the app).

Everything in Android is customizable, you just have to know where to look. ;-)


Try setting on the spinner this:

android:popupBackground="@android:color/transparent"


The layout you're defining is only used for an entry of your drop-down, not the drop-down itself. So setting the background to transparent won't have any effect on its background. But even if it would, setting the background to transparent would still have no effect, because a TextView (actually I believe any view) has a transparent background by default.

That being said, the right question would be: can you provide a custom layout for an entry's parent view (which is probably a List)? As far as I know, the answer is no, unfortunately.