Search code examples
androidactionbarsherlocktextcolor

Android: textColor = "@android:color/holo_blue_bright" not working


I am using ActionBarSherlock Library.

In a simple layout i have this code:

<?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>

I want the textColor to be blue and there are 3 different values in @android:color for blue. I used all the 3, to check which one looks good.

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

But i am getting white colored text when i am using the 1st two colors. And if i am using the 3rd color, the textView itself is not visible.

is not even showing up.

why is it so?

i am using application theme as

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

in my manifest.


Solution

  • Those colors are part of the platform and not ActionBarSherlock. They are also API 14+ only.