设置四周边框
<?xml version="1.0"encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
</shape>
只设置底部边框
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- This is the main color -->
<item>
<shape>
<solid android:color="#ffa8abad" />
</shape>
</item>
<!-- This is the line -->
<item android:bottom="2dp">
<shape>
<solid android:color="#FFFFFF" />
</shape>
</item>
</layer-list>
本文介绍了如何使用XML来为UI元素设置不同类型的边框,包括四周边框和仅底部边框的设计方法。通过具体的XML代码示例展示了如何调整边框的颜色、宽度等属性。
4754





