android - Syncronized layout in asyncTask -
i have built layout programmatically in class: tablemainlayout.
before viewing layout download info asynctask. when finished downloading layout want within asynctask pre loaded layout next view.
i need find way synchronize this, otherwise part intent when has not finished loading layout.
i explain improve code:
@override protected string doinbackground(string... params) { tablemainlayout layout = new tablemainlayout(); synchronized ( ??? ) { intent idata = new intent(context, actionbartabs.class); context.startactivity(idata); } }
what should set in place of question marks?
or have other advice? in short, have wait class initialized before go create intent.
thanks
you can seek :
@override protected void doinbackground(void... params) { // loading layout tablemainlayout layout = new tablemainlayout(); } @override protected void onpostexecute(void result) { // layout loaded, starting activity intent idata = new intent(context, actionbartabs.class); context.startactivity(idata); }
android android-layout android-asynctask
No comments:
Post a Comment