更改TextView的颜色颜色、TextView

2023-09-07 15:38:48 作者:北街深巷孤僻少年

我要如何改变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.