0
我希望我的应用具有背景渐变辐射,我认为我这样做了,但在运行时我的应用只显示一种颜色。Android背景渐变径向
这里我绘制背景
<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”中存储的值是什么,因为此代码可以正常工作为了我。 –