Android: TextView with border 帶邊框的TextView

一個textview_border.xml文件放在drawable文件夾裏面

<?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="1dip" android:color="#4fa5d5"/>
</shape>

爲要添加邊框的TextView添加一個background

						android:background="@drawable/textview_border"

搞定。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章