AutoCompleteTextview Color set white by default

前端 未结 10 2200
自闭症患者
自闭症患者 2020-12-18 18:16

I used an AutoCompleteTextView in my android app and it is working correctly. The only problem I am facing is that the color of the suggestions is white by default that is i

相关标签:
10条回答
  • You should use

    setTheme(android.R.style.Theme); before setContentView

    It worked for me :)

    0 讨论(0)
  • 2020-12-18 19:04

    Add this to your theme:

    <item name="android:autoCompleteTextViewStyle">@style/Widget.AppCompat.AutoCompleteTextView</item>
    
    0 讨论(0)
  • 2020-12-18 19:06

    This a logged bug,

    You can find some ways to fix it in the same link.

    Auto complete text view bug

    Bug solution

    Note: This solution will not work with lollipop

    I hope it helps...

    0 讨论(0)
  • 2020-12-18 19:07

    You can use simple_list_item_1 in ArrayAdapter,

    ArrayAdapter<String> autoadapter=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,cities);
                city = (AutoCompleteTextView) findViewById(R.id.location);
    

    Another solution is to quit the style in AndroidManifest.xml

    NOTE: This solution does not work with lollipop OS versions

    0 讨论(0)
提交回复
热议问题