I'm creating an ImageButton like so:
<ImageButton
android:id="@+id/one"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.333"
android:adjustViewBounds="true"
android:background="@null"
android:contentDescription="@string/description_image_button_one"
android:scaleType="fitEnd"
android:src="@drawable/dialpad_1" />
I would like to implement a way to have the button flash or change color when clicked/pressed just to identify that it as been clicked. I know I can reference the background as a drawable with a selector of state_pressed to a certain color. I'm trying to avoid making a separate xml file for each button in the drawable. What's the best way of doing this without creating all those extra xml files?