2013-02-17 4 views
0

드롭 다운 내용 AutoCompleteTextView은 흰색 단어입니다. 그러나 명확하게 볼 수는 없습니다. ? 어떻게AutoCompleteTextView의 드롭 다운 내용

이 처리하는이 내 코드입니다 : 글꼴은 아직 명확 볼 수없는

ArrayAdapter<String> myAdapter=new ArrayAdapter<String> 
(this,android.R.layout.browser_link_context_header, info_array); 

. 그런 다음 코드를 다음과 같이 변경합니다. myAdapter.setDropDownViewResource(R.layout.dropdown_tv);

여전히 글꼴을 볼 수 없습니다. 도와주세요. 매우 감사합니다!

+0

이 테마 무엇 :

나는 아래로 드롭의 레이아웃 변경하여 문제를 해결했다? –

답변

2

나는 그대로 응용 프로그램을 위해 당신은 어떤 테마 유지 만이이 활동의 ​​테마를 변경하는 제언 AutoCompleteTextView 여기

어떤 남자가 여기에 대답 didldumWidget.AutoCompleteTextView 테마 검사를 재정 의하여 그것을 해결 setTheme(android.R.style.Theme);에 그것은 당신을 도울 수 있습니다

Quoted from code.google.com

1. use an extended theme in your manifest: 
... 
<application android:theme="@style/Theme.Light.NoTitleBar.Workaround" ... > 
... 

2. create the new theme (res/values/themes.xml) which uses fixed styles: 
... 
    <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. create the styles (res/values/styles.xml) which fix the color: 
... 
    <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> 
... 
0

나는 동일한 문제가있다 그러나 나는 안드로이드 지원 라이브러리를 사용하고 있었다. 및 Theme.AppCompat.Light 테마.

내 문제는 android 2.3 기기에서만 발생합니다.

R.layout.support_simple_spinner_dropdown_item 
관련 문제