Rectangle inside another rectangle

点点圈 提交于 2019-12-03 08:29:30

If you want simple rectangles you could use a LayerList with two shapes as content:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <solid android:color="#a1a1a1" />
        </shape>
    </item>
    <item android:top="5dp" android:right="5dp" android:bottom="5dp"
        android:left="5dp">
        <shape android:shape="rectangle">
            <solid android:color="#f1f1f1" />
        </shape>
    </item>
</layer-list>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!