继续简单粗暴,直接上代码。
不获取焦点也不点击时Button的默认背景btn_unfocus_bg.xml:
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:radius="@dimen/dp_4" /> <solid android:color="#f1f1f1" /> </shape>
获取焦点但是不点击时Button的背景btn_focus_bg.xml:
<?xml version="1.0" encoding=