2012-06-05 7 views
0

을 변경 라디오 버튼 : 그것은 항상 흰색입니다내가 내 라디오 버튼의 텍스트 색상을 변경하지 못할 텍스트 색상

<RadioGroup 
         android:gravity="center" 
         android:layout_width="fill_parent" 
         android:layout_height="wrap_content" 
         android:orientation="horizontal" 
         android:color = "#000000" 
        > 

         <RadioButton 
          android:id="@+id/contact_yes" 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content" 
          android:color = "#000000" 
          android:text="@string/yes" /> 

         <RadioButton 
          android:id="@+id/contact_no" 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content" 
          android:color = "#000000" 
          android:text="@string/no" /> 
       </RadioGroup> 

을, 나는 검은 색으로 변경하려면?

이 속성은 텍스트의 색상을 변경하는

답변

1
android:textColor="#000000" 

또는

android:textColor="@android:color/black" 

사용 textColor 예를 들어 textColor="#ffff00ff"입니다 사전

1

에 감사

<RadioButton android:id="@+id/contact_yes" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:color = "#000000" 
android:text="@string/yes" /> 
1

이 시도 : 그렇게 텍스트 색상 방법 :

<RadioButton 
android:id="@+id/contact_yes" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:textColor="#000000" 
android:text="@string/yes" /> 
0

당신은 안드로이드를 사용할 수 있습니다.

예 로이드이다 텍스트 색상 = "# 00000000"

# 00000000에서 두 왼쪽 비트 투명 비트이다. # 00 (투명) 00 (레드 컬러) 00 (녹색 색상) 00 (블루 색상). 그들은 16 진수입니다.

투명한 비트에 대한 자세한 내용은 Set transparent background을 참조하십시오.