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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.