Android button設置背景色與邊框顏色
1.在drawable文件夾下面創建setbar_bg.xml
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <!-- 背景色 --> <solid android:color="#00000000"/> <!-- 邊框色 --> <stroke android:width="0.5dip" android:color="#f00" /> </shape>2.設置button順序
android:background="@drawable/setbar_bg"
去看看效果吧!