2012-09-27 5 views
0

ActionBarSherlock Library를 사용하고 있습니다.Android : textColor = "@android : color/holo_blue_bright"작동하지 않습니다.

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" > 

    <TextView 
     android:id="@+id/shareWhat" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="5dp" 
     android:textSize="15dp" 
     android:text="@string/what_is_the_picture_about_" /> 

    <TextView 
     android:id="@+id/shareProduct" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="5dp" 
     android:text="@string/product_underlined" 
     android:textColor="@android:color/holo_blue_dark" 
     android:textSize="25dp" /> 

    <TextView 
     android:id="@+id/sharePrice" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="5dp" 
     android:text="@string/price_underlined" 
     android:textColor="@android:color/holo_blue_light" 
     android:textSize="25dp" /> 

    <TextView 
     android:id="@+id/shareStore" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="5dp" 
     android:text="@string/store_underlined" 
     android:textColor="@android:color/holo_blue_bright" 
     android:textSize="25dp" /> 

    <TextView 
     android:id="@+id/shareMarket" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="5dp" 
     android:text="@string/market_underlined" 
     android:textColor="@android:color/holo_blue_bright" 
     android:textSize="25dp" /> 

</LinearLayout> 

내가 텍스트 색상이 파란색으로 원하는 @android의 3 개 가지 값이 있습니다 : 색 파란색위한 간단한 레이아웃에서

나는이 코드를 가지고있다. 나는 3을 모두 사용하여 어떤 것이 좋게 보이는지 확인했다.

1. android:textColor="@android:color/holo_blue_dark" 
2. android:textColor="@android:color/holo_blue_light" 
3. android:textColor="@android:color/holo_blue_bright" 

하지만 난 1 두 가지 색상을 사용하고 때 나는 white colored text을 얻고있다. 그리고 세 번째 색상을 사용하는 경우 textView 자체가 표시되지 않습니다.

심지어 보이지 않습니다.

왜 그렇습니까?

난 내 매니페스트

android:theme="@style/Theme.Sherlock" 

로 응용 프로그램 테마를 사용하고 있습니다.

+0

어떤 버전을 확인 하시겠습니까? – logcat

+0

API가 1 –

답변

2

해당 색상은 플랫폼의 일부이며 ActionBarSherlock이 아닙니다. 그들은 또한 API 14+ only입니다.

+0

인 기기에서 테스트 중입니다. ActionBar에 사용 된 파란색을 사용하려면 어떻게해야할까요? ActionBar 아래 선. –

+0

@ Archie.bpgc 아마도 색상을 참조하는 대신 색상을 하드 코딩 할 수 있습니다. 색상 값은'# ff33b5e5'이거나 그의 프로젝트에서 다른 색상 중 하나 일 수 있습니다 (https://github.com/JakeWharton/ActionBarSherlock/blob/master/library/res/values/abs__colors.xml).). 제이크, 아마도 당신이 확인할 수 있을까요? –

1

안드로이드 : 텍스트 색상 속성은 색상의 16 진수 문자열을 찾고, 예 : 녹색으로 만들 것

android:textColor="#0f0" 

. 원하는 색상의 16 진수 값을 찾아 해당 값으로 설정하십시오.

관련 문제