zuoxiao
2024-03-04 275fbc47873d5c4f78a57b4fa58a08e2e7af2dc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
 
    <!-- 灰色阴影 -->
    <item
        android:left="2dp"
        android:right="2dp"
        android:top="2dp">
        <shape>
            <solid android:color="#d6d6d6" />
            <corners android:radius="5dp" />
        </shape>
    </item>
    <!-- 白色前景 -->
    <item
        android:bottom="2dp"
        android:left="2dp"
        android:right="2dp">
        <shape>
 
            <!-- 边缘线的宽度和颜色 -->
            <stroke
                android:width="2px"
                android:color="@color/title_bg" />
 
            -->
            <!-- 中间渐变,角度0从左往右,正值为逆时针,270度为从上到下 -->
            <gradient
                android:angle="270"
                android:endColor="#efefef"
                android:startColor="#ffffff" />
            <!-- 设置四个角的角度 -->
            <corners
                android:bottomLeftRadius="5dp"
                android:bottomRightRadius="5dp"
                android:topLeftRadius="5dp"
                android:topRightRadius="5dp" />
            <!-- 设置padding -->
 
        </shape>
    </item>
</layer-list>