android - AnimationDrawable not showing when used with an AsyncTask -


i'm trying show animation animationdrawable in activity works fine when i'm not using asynctask callback interface.my code animation is,

img = (imageview)findviewbyid(r.id.gif); img.setbackgroundresource(r.drawable.animation); frameanimation = (animationdrawable) img.getbackground(); handler h=new handler();     h.postdelayed(new runnable() {         @override         public void run() {             frameanimation.start();         }     },100); 

if start asynctask animation won't run.it shows first frame.is there way make animation play (preferably) without removing callback?

all animations should done on ui thread. onpre , onpost execute should have animation code in it

i found this:

this may help


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -