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

Android 为TextView 添加边框

2014-03-17 10:31 375 查看
1.在res下的drawble文件夹下新建文件,textview_border.xml:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
   <solid android:color="#ffffff" />
   <stroke android:width="3dip" android:color="#4fa5d5"/>
</shape>


2.在textView中指定background:

android:background="@drawable/textview_border"


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