lizhanwei
2020-04-23 13d00b6ce7199d67133b7989b207fdb5e5b12c63
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
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
        <!-- Colored rectangle-->
        <item>
            <shape android:shape="rectangle">
                <size
                    android:width="280dp"
                    android:height="122dp" />
                <solid android:color="#2B3140" />
                <corners android:radius="7dp"/>
            </shape>
        </item>
        <!-- This rectangle for the left side -->
        <!-- Its color should be the same as layout's background -->
        <item
            android:right="280dp"
            android:left="-280dp"
            android:top="-280dp"
            android:bottom="-280dp">
            <rotate
                android:fromDegrees="35">
                <shape android:shape="rectangle">
                    <solid android:color="#181B2A" />
                </shape>
            </rotate>
        </item>
        <!-- This rectangle for the right side -->
        <!-- Their color should be the same as layout's background -->
        <item
            android:right="-280dp"
            android:left="280dp"
            android:top="-280dp"
            android:bottom="-280dp">
            <rotate
                android:fromDegrees="35">
                <shape android:shape="rectangle">
                    <solid android:color="#181B2A" />
                </shape>
            </rotate>
        </item>
</layer-list>