I saw this question (http://stackoverflow.com/questions/1521640/standard-android-button-with-a-different-color) and that works fine for normal buttons. Now I wanted to apply the same procedere on my ImageButtons, on which I add an Icon with android:src=”@drawable/icon_name”
I defined following style in styles.xml
<style name="ImageButton" parent="android:Widget.ImageButton">
<item name="android:background">@drawable/custom_image_button</item>
</style>
and set up the custom_image_button.xml in analogy with the custom_button.xml from my quote, but the problem is, by defining my Theme, I can find a android:buttonStyle, but no android:imageButtonStyle or something similiar. Is there another way to get to that point? Or is the only option to create a single icon for every state when customizing ImageButtons?
I think you need to double-check — there is an
android:imageButtonStyleattribute for themes. See themes.xml for all of the possible attributes for a theme.