Reputation: 4589
The answer I expected at first was the show method. Unfortunately if show has a lot of work to do, there is a delay between method call and screen appearance. So how does one get notified when screen appears?
Upvotes: 0
Views: 35
Reputation: 3146
Using show()
should be fine, the screen will be shown straight after so just put stuff you want done at the end where the delay should be negligible.
If the work that show()
does is in a super class, then just override it, call super.show()
and then do your stuff after, like so...
@Override
public void show () {
super.show();
doAnyOtherSlowStuffThatMightNeedDoing();
doTimeCriticalStuff();
}
I should probably add that a better solution would be to not do slow stuff in the show()
method to start with, but that's a whole other debate.
Upvotes: 1