给textview设置四周边框? 5
1个回答
展开全部
您好,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>
<?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>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询