【发布时间】:2015-11-04 21:49:17
【问题描述】:
我希望我的应用程序有一个背景渐变径向,我想我做到了,但在运行时我的应用程序只显示一种颜色。
这是我的可绘制背景
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:type="radial"
android:gradientRadius="360"
android:startColor="@color/color_start"
android:endColor="@color/color_end" />
我在我的活动 XML 中这样称呼它:
android:background="@drawable/background_app"
PD:对不起我的英语不好
【问题讨论】:
-
您在
color_start和color_end中存储的值是什么,因为这段代码适合我。 -
#001e2e #fff 我的应用只显示白色@BartoszLipinski
标签: android xml drawable gradient radial