Is it possible to draw a border around a textview?
Android – How to put a border around an Android textview
androidandroid-layoutandroid-shapedrawabletextview
Related Topic
- Android – How to stop EditText from gaining focus at Activity startup in Android
- Android – n easy way to add a border to the top and bottom of an Android View
- Android – Making TextView scrollable on Android
- Android – How to make links in a TextView clickable
- Android – unique Android device ID
- Android – How to change fontFamily of TextView in Android
- Java – Proper use cases for Android UserManager.isUserAGoat()
Best Answer
You can set a shape drawable (a rectangle) as background for the view.
And rectangle drawable back.xml (put into res/drawable folder):
You can use
@android:color/transparent
for the solid color to have a transparent background. You can also use padding to separate the text from the border. for more information see: http://developer.android.com/guide/topics/resources/drawable-resource.html