Android TextView text changes color on touch, but it shouldn't

android, textview

Solution

Try using solid colors for your textview attributes as follows

android:textColor="#000000"
android:textColorHighlight="#000000"

Problem

I've encountered a strange problem where I have a TextView that I have made scrollable through XML `android:scrollbars="vertical"` & programmatically with `.setMovementMethod(new ScrollingMovementMethod());` When I touch the TextView, the white text changes to light gray. If I remove the `.setMovementMethod(new ScrollingMovementMethod());` I don't get that response. What is causing this and how do I prevent it? Thanks ``` <TextView android:id="@+id/questionView" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="0.50" android:autoLink="none" android:clickable="false" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/Fading_Edge" android:includeFontPadding="true" android:linksClickable="false" android:longClickable="false" android:padding="4dp" android:scrollbars="vertical" android:text="Question" android:textSize="25px" android:typeface="sans" /> ```

Original source