border.xmlのような名前で以下をXMLに定義する。
<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>
あとはこれをbackgroundに設定すればよい。
<TextView android:text="Some text" android:background="@drawable/border"/>
参考: