android - Increasing Activity loading time -
i have 2 activities , b. activity start activity b. doing ui initialization, db query , local storage read operation in oncreate of activity b. problem activity b takes long time come visible. because of such operations in oncreate? want @ least ui changes visible first. please guide me
in oncreate perform heavy tasks in different thread/handler/asynctask. example
public void oncreate(bundle b){ super.oncreate(b); setcontentview(r.layout.yourlayout); // other gui initialization handler h = new handler(); h.post(new runnable{ public void run(){ // heave tasks } }); }
Comments
Post a Comment