Is it possible to draw a border around a textview?

+1 vote
asked Nov 5, 2015 in Android by johnfinanceblog (130 points)
recategorized Nov 23, 2015 by Admin

1 Answer

0 votes
answered Nov 6, 2015 by Admin (1,860 points)
<TextView android:text="Some text" android:background="@drawable/back"/>

And 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="#ffffff" />
   <stroke android:width="1dip" android:color="#4fa5d5"/>
</shape>
Welcome to I Can Crack, where you can ask questions and receive answers from other members of the community.

68 questions

47 answers

3 comments

5,318 users

...