请举例说明在
Android上使用XML指定RGB格式的颜色.语法是#rrggbb.
解决方法
您可以在XML中指定RGB格式的颜色,如下所示:
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:text="Test text"
- android:textColor="#332116"
- android:textSize="16sp"
- android:textStyle="bold" />
一般形式:
- android:textColor="#332116" is "#rrggbb"