<Button
android:id="@+id/info_button"
android:layout_width="0dp"
android:layout_weight="1"
android:textColor="@color/white"
android:background="@color/colorPrimary"
android:onClick="getInformation"
android:text="@string/information"
android:layout_height="48dp" />
我有下面的选择器我想在按钮中使用并使用背景颜色。有什么办法吗?
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/btn_preess" android:state_pressed="true"/>
<item android:drawable="@color/btn_preess1" android:state_focused="true"/>
<item android:drawable="@color/btn_preess1"/>
</selector>