Blackberry Screen navigation from MenuItem
Would the code below cause an issue if it was called from the run method of a MenuItem? My concern is whether the MenuItem is part of the UiEvent thread and if there could be some side effects.
//Allow back and forward navigation
void openScreen(eSafeScreen nextScreen) {
//remains on current s开发者_Go百科creen if next screen does not exists
if (nextScreen != null) {
nextScreen._prevScreen = this;
UiApplication.getUiApplication().pushScreen(nextScreen);
UiApplication.getUiApplication().popScreen(this);
}
}
Yes, MenuItem is a part of UI thread.
No, it's not the case you should worry about UI thread.
See also: Thinking Blackberry - BlackBerry UI Threading - The Very Basics
精彩评论