Android 为TextView 添加边框

时间:2014-03-17 17:08:32   收藏:0   阅读:606

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"

bubuko.com,布布扣

Android 为TextView 添加边框,布布扣,bubuko.com

原文:http://blog.csdn.net/howlaa/article/details/21374157

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!