if (direction != TransitionDirection.To) {
return;
}
final Page to;
final PageHistory pageHistory = PageHistory.Instance;
final NavigateInfo info = pageHistory.getNavigateInfo();
if (false == info.isGoBack()) { // goto
to = this;
// TODO: change to use scheduler deferred command.
Timer timer = new Timer() {
@Override
public void run() {
to.onNavigateTo(info.getFromPage(), info.getValue());
to.initNavigationIfRequired();
}
};
timer.schedule(1);
} else { // goback
to = pageHistory.current();
Timer timer = new Timer() {
@Override
public void run() {
to.onNavigateBack(info.getFromPage(), info.getValue());
to.initNavigationIfRequired();
}
};
timer.schedule(1);
}