1

我想创建一个渐变可绘制矩形作为视图的背景

它应该看起来像这样

在此处输入图像描述

现在看起来像这样

它看起来像这样:

在此处输入图像描述

这是我的可绘制代码

<?xml version="1.0" encoding="utf-8"?>

<stroke android:width="10dp" />
<gradient
    android:angle="180"
    android:centerColor="#ffffff"
    android:centerX="0.25"
    android:centerY="0.25"
    android:endColor="#B38340"
    android:startColor="#EBCB92" />

我该怎么做才能让它看起来像我需要的那样?

4

0 回答 0