android - Main Layout visibile when showing popup -


my app shows small popup window animated gif when run it. problem main layout(blank) showing few microseconds before disappearing , popup shows. have tried using mainlayout.setvisibility(view.invisible) not make difference. there way can change behavior main layout not show @ all.

this main activity java file :

public class mainactivity extends activity {        @override         protected void oncreate(bundle savedinstancestate) {             super.oncreate(savedinstancestate);     intent intent = new intent(this,animepopupactivity.class);     startactivity(intent);     finish();       } } 

this java file called main activity :

public class animepopupactivity extends activity {          @override         protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         requestwindowfeature(window.feature_no_title);          inputstream stream = null;         try{             stream = getassets().open("382.gif");         } catch (ioexception e) {             e.printstacktrace();         }         gifmovieview view = new gifmovieview(this,stream);         view.setlayertype(view.layer_type_software, null);          mainlayout = new linearlayout(this);         //mainlayout.setvisibility(view.invisible);         setcontentview(mainlayout);          layout = new linearlayout(this);         popup = new popupwindow(this);         params = new layoutparams(layoutparams.wrap_content, layoutparams.wrap_content);          layout.setorientation(linearlayout.vertical);         layout.addview(view,params);         popup.setcontentview(layout);           new handler().postdelayed(new runnable(){             public void run(){                 popup.showatlocation(mainlayout, gravity.center, 10, 10);                 popup.update(-1,-1,240,320);                  }         },100); 


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -