如何裁剪矩形的边缘

时间:2019-05-31 23:53:18

标签: android xml shapes layer-list

我正在尝试创建Windows 98之类的边框 enter image description here

具有缩放功能:

enter image description here

下面的代码给了我这个

enter image description here

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:bottom="3dp"
        android:right="3dp">
        <shape android:shape="rectangle">
            <solid android:color="#7f7f7f" />
        </shape>
    </item>

    <item
        android:top="3dp"
        android:left="3dp">
        <shape android:shape="rectangle">
            <solid android:color="#ffffff" />
        </shape>
    </item>

    <item
        android:top="3dp"
        android:bottom="3dp"
        android:left="3dp"
        android:right="3dp">
        <shape android:shape="rectangle">
            <solid android:color="#acacac" />
        </shape>
    </item>
</layer-list>

如何使它看起来像Windows 98边框?谁能帮我解决这个问题?

0 个答案:

没有答案