I having an issue where the ImageButton background is being drawn with a different drawable from one of my resources. I’m setting the background to be transparent but on some cases it’s picking up one of my drawables called bottom_shadow.9.png. Why why!? It’s freaking weird…
I’ve seen this issue before… Some of my app users have complained seeing this issue and now I’m determined to figure this out! Take a look below what I currently have. Any tips or ideas would help.
The color value I created under values/colors.xml:
<color name="transparent">#00000000</color>
My ImageButton under my one xml layout under layout/:
<ImageButton
android:id="@+id/ibHelp"
android:layout_width="wrap_content"
android:layout_height="@dimen/settings_list_item_height"
android:background="@color/transparent"
android:contentDescription="@string/content_desc_more_information"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:scaleType="centerInside"
android:src="@drawable/btn_help" />
This is what I’m seeing on the generated R.java file:
public static final class drawable {
public static final int bottom_shadow=0x7f020000;
}
public static final class color {
public static final int transparent=0x7f080009;
}
This is what it should look like:

This is what I’m seeing:

Could it be related to this issue?
http://code.google.com/p/android/issues/detail?id=20283