0

Can I declare a gif like a jpg in eclipse ?

<ImageView
    android:contentDescription="@string/ppant"
    android:id="@+id/gifYesOrNo"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/button4"
    android:layout_alignLeft="@+id/button4"
    android:layout_alignRight="@+id/button4"
    android:src="@drawable/gif" />

Thanks

Catfoxes
  • 101
  • 1
  • 9

1 Answers1

0

You can declare it, but it won't be animated. If you want it to be, you can use webview (not good solution) and VideoView. You can find some help here: Display Animated GIF. If you really want to be in a ImageView check this out: Playing an animated GIF image file in imageview. Whatever you decide, you can find a lot of useful stuff here: http://droid-blog.net/2011/10/14/tutorial-how-to-use-animated-gifs-in-android-part-1/ . Hope this helps.

Community
  • 1
  • 1
ya-ivanov
  • 516
  • 2
  • 11