Try a combination of onLoad () and scheduleFinally ().
In the code below, the onResize and "scheduleFinally" callbacks will always have good results. Between the two of them you must catch all the necessary events.
"onLoad" often returns 0 for size, as described in the original task. You can just skip this part.
@Override public void onResize() { recordSize("onResize"); } @Override public void onLoad() { super.onLoad(); recordSize("onLoad"); Scheduler.get().scheduleFinally(new Scheduler.ScheduledCommand() { @Override public void execute() { recordSize("scheduleFinally"); }}); }
Trade-Ideas Philip
source share