tags:

views:

124

answers:

1

Hi,

In android, when I press on a TextView, the text changes color (from white to grey). Can you please tell me how can I disable that functionality?

Thank you.

+1  A: 

The TextView gets its styling from whatever styles or themes you have set in your application. See android docs for an overview of those.

Part of the default theme is the look and feel of a widget in each of its states. A selector is used to configure the look and feel in a particular state, for example if it is enabled, or clicked.

To override the behavior you need to create a style (as described in the android doc above) and apply that style to your TextView.

Mayra