Android TextView inside a ListView setTextHighlightColor() issue

Posted by y ramesh rao on Stack Overflow See other posts from Stack Overflow or by y ramesh rao
Published on 2010-04-08T13:45:09Z Indexed on 2010/04/08 14:13 UTC
Read the original article Hit count: 786

Filed under:

I have Listview and Textview inside it now the thing is that i want to change the Text Color over the Selection of the that cell in the Listview but setting setTextHighlightColor of Textview is not giving this output

I have tired setting a selector for this but that is not Heling too.

Can this be solved. What might be causing the issue to populate.

The Cell.xml is

<ImageView 
    android:id="@+id/thumbnail" 
    android:layout_width="48dip"
    android:layout_height="48dip" 
    android:layout_gravity="center_vertical"
    android:src="@drawable/icon" 
/>
<TextView 
    android:id="@+id/username" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" 
    android:layout_toRightOf="@id/thumbnail"
    android:layout_alignParentTop="true"
    android:gravity="top" 
    android:text="Username" 
    android:textColor="@drawable/timeline_username_selector"
/>
<TextView 
    android:id="@+id/time" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentRight="true"
    android:layout_marginLeft="10px"
    android:text="31stMarch,2010" 
    android:textColor="@drawable/timeline_username_selector"
/>

<TextView 
    android:id="@+id/textTweet" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" 
    android:layout_below="@+id/username"
    android:layout_toRightOf="@id/thumbnail"
    android:layout_alignParentBottom="true"
    android:gravity="top" 
    android:textColor="@drawable/timeline_tweet_selector"
/>

And the selector for the text color is something like this

© Stack Overflow or respective owner

Related posts about android