我在我的 android 应用程序中使用了 AutoCompleteTextView,它工作正常.我面临的唯一问题是建议的颜色默认为白色,即我看不到任何建议.因此,当我开始输入某些内容时,列表会以白色条目(不可见)展开,但是当我单击任何项目时,我发现它可以正常工作.似乎只有颜色是问题.我正在使用以下代码.
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 am not able to see any suggestions. So when i start typing something the list expands with white entries(invisible), but when i click on any item i find that it is working as it should be. Only the color seems to be the problem. I am using the following code.
<AutoCompleteTextView android:id="@+id/location" android:textColor="#000000" android:layout_width="fill_parent" android:layout_height="wrap_content"></AutoCompleteTextView>和
ArrayAdapter<String> autoadapter=new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line,cities); city = (AutoCompleteTextView) findViewById(R.id.location); city.setAdapter(autoadapter); city.setThreshold(1); city.setTextColor(Color.BLACK);谁能告诉我这是什么问题??- 提前致谢
Can anyone please tell me what the problem is?? -Thanks in advance
推荐答案这是一个记录的错误,
您可以在同一个链接中找到一些修复方法.
You can find some ways to fix it in the same link.
自动完成文本查看错误
错误解决方案
注意:此解决方案不适用于 lollipop
希望能帮到你...
更多推荐
AutoCompleteTextview 颜色默认设置为白色
发布评论