更改TextView的颜色 [英] Change TextView color

查看:230
本文介绍了更改TextView的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要如何改变R,G,个人的TextView的B'

How do I change the R,G, B of an individual TextView?

推荐答案

TextViews没有亮度的财产。他们的前景和背景颜色的设定ARGB值,如:0xff000000为不透明的黑色背景,以及为0xffffffff,为白色不透明的前景

TextViews do not have the property of brightness. Their foreground and background colors are set with ARGB values, such as: 0xff000000 for an opaque black background, and 0xffffffff, for opaque white foreground.

要增加亮度,只需按相同的量增加所有的R,G,B的。

To increase brightness, just increase all of R,G, and B by the same amount.

要改变一个TextView的颜色,你可以使用安卓背景安卓文字颜色 XML属性

To change the color of a TextView, you can use the android:background and android:textColor xml attributes.

这篇关于更改TextView的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆