TEL:400-8793-956
当前位置:程序、服务器

RelativeLayout颜色更改

提问者: 近期获赞: 浏览人数: 发布时间:2021-02-09 17:13:25

 问:我将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_centerHorizo​​ntal = “ true” android:layout_centerVertical = “ true” android:text = “树屋爱我!” android:textColor = “ @android:color / white”  
  
 
答:将“ @android:color /#fff092b0”更改为“#fff092b0”。“ @android:color”用于已定义的颜色。
上一篇: 解决两个同名用户且何时没有用户的更好方法?
下一篇: 这无效吗?如果第二个字符不是大写,我需要抛出异常