ArrayAdapter<String> myAdapter=new ArrayAdapter<String>(this,android.R.layout.browser_link_context_header, info_array);myAdapter.setDropDownViewResource(R.layout.dropdown_tv);了也不好使
请指教

解决方案 »

  1.   

    把 activity 中的 AutoCompleteTextView 变为 setTheme(android.R.style.Theme);
    重写 Widget.AutoCompleteTextView1.在 manifest 中使用一个 extended theme 
    ...
    <application android:theme="@style/Theme.Light.NoTitleBar.Workaround" ... >
    ...2.创建一个新的 theme (res/values/themes.xml)
    ...
        <style name="Theme.Light.NoTitleBar.Workaround" parent="@android:style/Theme.Light.NoTitleBar">
            <item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextViewLight</item>
            <item name="android:dropDownItemStyle">@style/Widget.DropDownItemLight</item>
        </style>
    ...
    3. 创建styles (res/values/styles.xml)修复颜色
    ...
        <style name="AutoCompleteTextViewLight" parent="@android:style/Widget.AutoCompleteTextView">
            <item name="android:textColor">@android:color/primary_text_light</item>
        </style>
        <style name="Widget.DropDownItemLight" parent="@android:style/Widget.DropDownItem">
            <item name="android:textColor">@android:color/primary_text_light</item>
        </style>
    ... 
      

  2.   

    感谢CSDN_Ask的回答   不过我发现
    改成ArrayAdapter<String> myAdapter=new ArrayAdapter<String>
    (this, android.R.layout.simple_expandable_list_item_1, info_array);
    然后再
    AC_TV.setTextColor(Color.BLACK);//设置输入框里的字体颜色
    就好了android.R.layout.simple_expandable_list_item_1这个就可以正常显示,其他layout甚至有报错的。估计AutoCompleteTextView必须对应 适当的layout。
      

  3.   

    下拉框里的每一个item有对应的layout的,设置下就可以,网上找找吧