2011-12-26 6 views
2

내 문제는 아래 이미지에서 흰색 배경에 흰색 텍스트가 표시된다는 것입니다. 내가 그것을 클릭하면 텍스트가 enter image description hereTheme.Light를 사용하여 ListFragment의 흰색 배경에 흰색 텍스트

내 레이아웃

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:orientation="vertical" > 

<LinearLayout 
    android:id="@id/actionbar" 
    style="@style/SPActionBar" /> 

<fragment 
    android:id="@+id/layout_home_list_fragment" 
    android:name="at.bartinger.smartphonelib.activity.fragment.ProfileListFragment" 
    android:layout_width="fill_parent" 
    android:layout_height="0dp" 
    android:layout_weight="1" /> 

<LinearLayout 
    android:id="@+id/layout_home_adlayout" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"> 
</LinearLayout> 

ProfileListFragment는 ListFragment이 확장 내가 말했듯이 전체 응용 프로그램 매니페스트 (Theme.Light를 사용하여 블랙 얻는다 xml)

+0

텍스트 색상을 검정색으로 변경하십시오. – AAnkit

+0

검은 색 바탕에 검은 색으로 표시되어야합니다. –

+0

검은 바탕에 흰색입니다. 배경이 흰색으로 바뀌 었습니다. 검은 색으로 텍스트 색상을 변경해야합니다. – AAnkit

답변

3

SimpleCursorAdapter에서 이것을 사용하고 있습니까?

getActivity().getApplicationContext() 

그렇다면, 그것은 트릭을 할해야

getActivity().getBaseContext() 

로 교체합니다.

+1

getBaseContext()에 관한 것은, 피해야 만하는 것처럼 들립니다. 대신 getView(). getContext()를 사용하여이 문제를 해결할 수있었습니다. –