我在呈现下一个屏幕时遇到了问题,如果使用了无限进度,如果这段代码没有注释,那么我就能够显示下一个屏幕,其中显示了一个列表。
final Form poList = (Form) super.createContainer(getResourceFilePath(), "POList");
ConnectionRequest request = new ConnectionRequest()
{
Hashtable response = null;
protected void readResponse(InputStream input)
{
//Read and parse the response
}
protected void postResponse()
{
if (response != null)
{
try
{
//Get a sorted List from the response and use it to fill the list
poList.show();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
};
request.setUrl(poListUrl);
request.setPost(false);
request.addRequestHeader("Authorization","Bearer "+accessToken);
request.setContentType("text/xml");
/*
If these three lines are commented then the next form is shown properly
*/
InfiniteProgress ip = new InfiniteProgress();
Dialog dlg = ip.showInifiniteBlocking();
request.setDisposeOnCompletion(dlg);
NetworkManager.getInstance().addToQueue(request);发布于 2014-02-18 05:20:12
在处理无限进度和显示下一个表单之间有一个竞争条件。移动前面显示代码的对话框
ConnectionRequest request = new ConnectionRequest() 然后
dlg.dispose();
//Get a sorted List from the response and use it to fill the list
poList.show();https://stackoverflow.com/questions/21840262
复制相似问题