Is it possible to draw a border around a textview?
A1. You can set a shape drawable (a rectangle) as background for the view.
<TextView android:text="Some text" android:background="@drawable/back"/>
rectangle drawable back.xml (put into res/drawable folder):
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@android:color/white" />
<stroke android:width="1dip" android:color="#4fa5d5"/>
</shape>
A2. Using a shape drawable |
Save the following as an XML file in your drawable folder (for example, my_border.xml):
Then just set it as the background to your TextView:
<TextView
|
Comments
Post a Comment