1. Create setbar_bg.xml under the drawable folder
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <!-- 背景色 --> <solid android:color="#FFE4B5"/> <!-- 边框色 --> <stroke android:width="0.5dip" android:color="#81CE47" /> </shape>
2. Set the TextView order
android:background="@drawable/setbar_bg"
For more details on how to set the background color and border of Android TextView, please follow PHP. Chinese website!