设置四周边框

<?xml version="1.0"encoding="UTF-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android">

   <solid android:color="#00000000"/>

   <stroke android:width="2dip"android:color="#ff000000" />

</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>

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐