Search code examples
androidlistviewanimationdrawablegetview

dont stop the animation in listview


i'm working with AnimationDrawable for download progressBar i put the animation in getview an it's working fine. but when i'm scrolling the list the animation has been stoped. is there any method in AnimationDrawable to fix this. like setCancelable in Dialog.

please help me ... thanks

ImageView anim = (ImageView) rootview.findViewById(R.id.imageView2);
AnimationDrawable animation = (AnimationDrawable) anim.getDrawable();
animation.start();

ScreenShot:

enter image description here


Solution

  • i found the answer :

    i have to use ViewHolder im my ArrayAdapter class.

    thank you all.