Search code examples
javaandroidandroid-4.2-jelly-bean

Android 4.1 Jellybean drawable on ImageButton not showing


I have an ImageButton such as this:

<ImageButton android:id="@+id/donateButton"
           android:layout_width="fill_parent"
           android:layout_height="fill_parent"
           android:layout_marginRight="1dp"
           android:src="@drawable/donate"
           android:contentDescription="@string/donate"
           />

Where @drawable/donate points to a donate.gif On older Android versions (1.5, 1.6, 2.X) this image shows up. Anyone having similar issues or have a solution?


Solution

  • change your graphic from GIF to png.

    Gif is not recommended, see : http://developer.android.com/guide/topics/resources/drawable-resource.html#Bitmap