【发布时间】:2016-11-09 04:59:15
【问题描述】:
这很傻,但是如何在android上放一个背景rgb?
我正在尝试放置 RGB 颜色的背景,但我找不到怎么做。
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background= ?
android:orientation="vertical" >
我已经这样做了,但不起作用
Color.rgb(200,0,0)
【问题讨论】:
-
使用 #ff0000 获得红色
-
问题是我需要用RGB格式@NabinKhadka
-
为什么你需要在RGB中做任何强有力的理由? @Carlos Uriel Santiago
-
学校作业 :( @Kinjal
-
你不能在 xml(布局)中使用 RGB 颜色,你必须像
anyView.setBackgroundColor(Color.rgb(200, 00, 00));这样以编程方式完成
标签: android xml android-layout colors