问:我将textcolor更改为白色,现在我需要使用代码#fff092b0将整个背景更改为darkpink,但是它不起作用,我也不知道该怎么办。。我更改了android:background =“ @ android:颜色blabla”(从白色到此代码,代表darkPink),但表示有错误,请帮忙!
activity_main.xml
<RelativeLayout xmlns:android = “” http://schemas.android.com/apk/res/android“
android:layout_width = ” match_parent“ android:layout_height = ”“ match_parent” android:background = “” @android:color /#fff092b0“ > <TextView android:id = “ @ + id / textView1” android:layout_width = “ wrap_content” android:layout_height = “ wrap_content” android:layout_centerHorizontal = “ true” android:layout_centerVertical = “ true” android:text = “树屋爱我!” android:textColor = “ @android:color / white”
答:将“ @android:color /#fff092b0”更改为“#fff092b0”。“ @android:color”用于已定义的颜色。