hotveryspicy gave a great answer and really pointed me in the right direction. Thanks, but I had a few questions with the answer.
What I want is a button with black text and a gray background in the normal state and a red background with white text in the selected state. Like this:

hotveryspicy, :
drawable textColor. , . , XML ?
, : buttonselector.xml. , , drawable.
, , :
Color State Resource, :
: res/colors/link_button.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="#ffffff"/>
<item android:color="#000000"/>
</selector>
3 :
Shape Drawable:
: res/drawable/link_button.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#cccccc"/>
</shape>
, Shape Drawable:
: res/drawable/link_button_selected.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ff0000"/>
</shape>
Drawable Selector, .
: res/drawable/link_button_selector.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/link_button_selected"
android:state_pressed="true" />
<item
android:drawable="@drawable/link_button" />
</selector>
:
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="Button"
android:textColor="@color/link_button"
android:background="@drawable/link_button_selector"
/>
!