0
我想在黑莓中實現一個加載屏幕。我用下面的代碼加載屏幕在Blackberry中不起作用?
PleaseWaitPopupScreen.showScreenAndWait(new Runnable() {
public void run() {
//**Segment 1** here i write the code for network call
}
}, "please wait");
// **Segment 2**:Here processing the data get from network call
問題段完成1段2名之前的作品我也嘗試下面的代碼
HorizontalFieldManager popHF = new HorizontalFieldManager();
popHF.add(new LabelField("Pls wait..."));
final PopupScreen waitScreen = new PopupScreen(popHF);
new Thread()
{
public void run()
{
synchronized (UiApplication.getEventLock())
{
UiApplication.getUiApplication().pushScreen(waitScreen);
}
// **Segment 1**Here Some Network Call
synchronized (UiApplication.getEventLock())
{
UiApplication.getUiApplication().popScreen(waitScreen);
}
}
}.start();
// **Segment 2**:Here processing the data get from network call
出現同樣問題嘗試從以下Support forum link代碼。任何幫助將不勝感激。
感謝
大。這工作正常。我想添加ui組件。所以我使用第二種方法。 –