给textview设置四周边框?
发布网友
发布时间:2024-01-26 16:07
我来回答
共1个回答
热心网友
时间:2024-02-03 11:43
您好,1、设置四周边框
<?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>
2、只设置底部边框
<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>