开发者

Color of the text in TextView changes color

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?

T开发者_如何学Chank you.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜