android - When exchange Activity black screen -
i have problem when call activity. screen goes black, , when done preload layout shows activity.
the problem layout needs load heavy.
how can manage thing not good?
this code, tried various tests:
1 syncronize 2 asinktask
if (tab.getposition() == 0) { /* * ----------------- tab data ----------------- */ try { system.gc(); //initialize class needs load activity mylayout = new tablemainlayout(this); //i tried give time load, that's not good! synchronized (this) { wait(5000); } setcontentview(mylayout); } catch (exception e) { log.i("link", "errore actionbartabs update series: " + e); } }
but no avail. can tell me solution? or advice?
edit : update code: tablemainlayout.java
my problem can not figure out when layout ready. tried put in async nothing, tried syncronize nothing. enough simple example of how figure out when layout loaded , ready displayed. i'll customize code.
Comments
Post a Comment