Animation in splash screen android doesn't work properly -


i have transition on slashscreen animation starts, others not. can't understand how solve this, here splash activity animation of textview. strange thing works correctly, in particular on emulator works more times on device.

public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);      setcontentview(r.layout.splash_screen);      title1 = (textview)findviewbyid(r.id.textview1);             animation1 = animationutils.loadanimation(this,r.anim.long_slide_left);      title1.startanimation(animation1);      new handler().postdelayed(new runnable() {         public void run() {              intent intent = new intent();             intent.setclass(splashscreenactivity.this, mainactivity.class);              splashscreenactivity.this.startactivity(intent);                             splashscreenactivity.this.finish();              // transition splash main menu             overridependingtransition(r.anim.activityfadein,                     r.anim.activityfadeout);          }     }, 1000); } 

instead of handler, try simple thread.

thread splash=new thread(){             @override             public void run() {                  try {                           sleep(3000);                    } catch (interruptedexception e) {                     // todo auto-generated catch block                     e.printstacktrace();                 }finally{                     finish();                     intent i=new intent(getbasecontext(), mainactivity.class);                     startactivity(i);                 }             }         };         splash.start(); 

Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

Python : Get gtk.treeview selection from another widget -

.htaccess: Transfer name to index.php if not directory public -