我可以使用一个线性布局放置一个径向渐变形状作为背景吗?这是我现在拥有的:
这是形状:
这是形状:
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:endColor="#e6e6e6"
android:gradientRadius="800"
android:startColor="#fafaf9"
android:type="radial"/>
</shape>
LinearLayout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/accueil_bg_gradient">
</LinearLayout>
我只想让我的渐变从屏幕左上角开始,并在右下角结束。
非常感谢!
<gradient>
元素中使用android:angle
。<gradient> - m039