-1

I am new to Android. I Have Listview in My Activity and it's working Fine. But suddenly in mind one thought is going on. Is there any way to put gif animation in background of my Listview and display data to on gif Image. Let's say that In Our Listview we Have set background color as follow.

android:background="@color/Mycolor

so it can change the whole Listview color But I want to

display gif Animation Like small Image of Birds are flying in Background

. If it is possible then give suggestion.

Any Help will be Appreciated.

Harshad
  • 1,344
  • 1
  • 10
  • 25

2 Answers2

0

use an Imageview in row background and play gif on it using this component.

Mi-Creativity
  • 9,554
  • 10
  • 38
  • 47
saber safavi
  • 452
  • 3
  • 8
0

I think this is the way you can set,first you need to divide gif animation in indvidual frame,then you need to create one xml for background and use animation-list and add all the frames of gif image and set that xml as background

<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
    android:oneshot="false" >

    <item
        android:drawable="@drawable/frame1"
        android:duration="1000"/>

    <item
        android:drawable="@drawable/frame2"
        android:duration="1000"/>

    <item
        android:drawable="@drawable/frame3"
        android:duration="1000"/>



    ....

</animation-list>
Aditya Vyas-Lakhan
  • 13,409
  • 16
  • 61
  • 96