android - How To Stop FrameAnimation And launch a new Activity ??(Intent) -


 public class mainpage extends activity {  // declaring image view , animation drawable     imageview view;     imageview view1;     animationdrawable frameanimation;      @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.mainpage);          // typecasting image view         view = (imageview) findviewbyid(r.id.imageanimation);           // setting animation_list.xml background of image view          view.setbackgroundresource(r.drawable.animation_list);          // typecasting animation drawable         frameanimation = (animationdrawable) view.getbackground();     }      // called when activity becomes visible or invisible user     @override     public void onwindowfocuschanged(boolean hasfocus) {         super.onwindowfocuschanged(hasfocus);         if (hasfocus) {             // starting animation when in focus             frameanimation.start();         } else {             // stoping animation when not in focus             frameanimation.stop();         }     }   } 

is there method stop frame animation , launch activity/intent after ??

i tried search query on google of code consists start , stop button stop frame animation ...need query without button ..help !!

yes frameanimation.stop(); method used stop animation. , start new activity can use following code-

startactivity(mainpage.this, newactivity.class); 

or

intent = new intent(this, newactivity.class); startactivity(i); 

you can use activity name want start in place of newactivity.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -