AutoCompleteTextView android:dropDownSelector not working -


I am trying to customize a selector for my autocomplete view, so that when color Select changes I am implementing android: dropDownSelector . But this is not working and I get the default value ....

  aAdapterAutoComplete = New ArrayAdapter & LT; String & gt; (GetActivity () getApplicationContext (), R.layout.auto_complete_text, suggest.); AutoComplete.setAdapter (aAdapterAutoComplete);  

Layout:

  & lt; Android: layout_height = "match_parent" Android: dropDownSelector = "@ drawable / autocomplete_selector" android: signal = "@ String / type_here_to_search "Android: imeOptions =" ​​actionSearch "Android: textSize =" @ Dimen / text_size "& gt; & Lt; Requestfocus / & gt; & Lt; / AutoCompleteTextView & gt;  

auto_complete_text:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: padding = "@ Dimen / serach_bar_padding_top" Android: textSize = "@Dimen / text_size" Android: TextColver = "@color / text_golore"  

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Selector xmlns: Android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Item android: state_pressed = "true" Android: drawable = "@ drawable / auto_select_color" /> & Lt; Item android: drawable = "@drawable / auto_focus_golf" />  

The man has said that worked for me, Which is to remove the background color from your adapter list item, and the desired background color to DropDownBackgroundResource . Set as

but I think you have no background in XML, try


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -