【发布时间】:2009-08-14 06:36:17
【问题描述】:
如果有人可以帮助我使用如何使用 shape drawable 作为我的视图的背景 xml,我真的很感激。
这是我尝试过的: 但我从来没有得到颜色。无论我放置什么颜色属性,Android 总是给我白色背景上的黑色文本。
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dip" android:color="#FBBB" />
<solid android:color="#6000"/>
</shape>
试过了,不行
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:color="#6000>
</shape>
试过了,不行
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:background="#6000>
</shape>
我用谷歌搜索这是我发现尝试的有限结果。
【问题讨论】:
-
您的形状示例在这里有效。您可能没有在 View 中正确设置
-
@n179911:请不要以这样的词开头:help in... 我们已经知道您正在寻求帮助