您的位置:首页 > 移动开发 > Android开发

Android TextView设置背景色和边框

2013-04-23 09:19 639 查看
1.在drawable文件夹下面创建setbar_bg.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
    <!-- 背景色 -->
    <solid android:color="#FFE4B5"/>
    <!-- 边框色 -->
    <stroke android:width="0.5dip" android:color="#81CE47" />
</shape>


2.设置TextView顺序

android:background="@drawable/setbar_bg"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: