将现场管理器添加到应用程序 BlackBerry 中的主屏幕
我正在使用 OS 5.0 及更高版本的 BlackBerry 应用程序。该应用程序有一个屏幕,在屏幕顶部显示一个 Next
和一个 Previous
按钮。列表字段也显示在该屏幕的这两个按钮的底部
当我单击下一个按钮
和上一个按钮
时,我的列表将更新显示数据。
当我单击下一个/上一个按钮我必须在屏幕中央显示小的 VerticalfieldManager ,并带有标签“请稍候...”,因此在设计此屏幕后,我们如何在另一个管理器上添加更多的字段管理器?
有没有什么方法可以像 iPhone AppDelegate 屏幕一样在应用程序主屏幕上显示该字段?
btnState.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field field, int context)
{ vfm_Middle.add(lblPleasewait);
popup = new PopupScreen(manager);
Thread thread = new Thread()
{
public void run()
{
try
{
Updatelistfield();
stop();
}
catch (InterruptedException e)
{
e.printStackTrace();
}
super.run();
}
public synchronized void stop()
{
// TODO Auto-generated method stub
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run()
{
// TODO Auto-generated method stub
//popup.delete(vfm_Main);
//popup.deleteAll();
//vfm_Main.delete(lblPleasewait);
//lblPleasewait.setText(null);
}
});
}
};
thread.start();
}
});
I am working with a BlackBerry application for OS 5.0 and later. The application has one screen which displays at the top of screen a Next
and a Previous
button. and list field also display in this screen at bottom of these both button
When i click on NEXT Button
and Previous Button
my List will be updated display data..
When i click on NEXT/PREVIOUS Button i have to display small VerticalfieldManager at the center of the screen with Label "Please wait ..." so after design this screen how can we add more field manager in over the another manager ?
Is there any way to display that Field at the application MainScreen like iPhone AppDelegate screen?
btnState.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field field, int context)
{ vfm_Middle.add(lblPleasewait);
popup = new PopupScreen(manager);
Thread thread = new Thread()
{
public void run()
{
try
{
Updatelistfield();
stop();
}
catch (InterruptedException e)
{
e.printStackTrace();
}
super.run();
}
public synchronized void stop()
{
// TODO Auto-generated method stub
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run()
{
// TODO Auto-generated method stub
//popup.delete(vfm_Main);
//popup.deleteAll();
//vfm_Main.delete(lblPleasewait);
//lblPleasewait.setText(null);
}
});
}
};
thread.start();
}
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正确的方法是使用阻塞对话框。在 BB API 中,可以按如下方式完成此操作:
这具有阻止 GUI 的优点:如果用户按下菜单或 esc 键,则不会产生任何效果。
如果您想在没有对话框的屏幕上执行此操作,则可以添加一个空的
VerticalFieldManager
,当必须显示消息时,您可以用标签填充它。这样,只刷新管理器,而不是更新整个屏幕。但是,您应该编写逻辑,不允许用户按任何按钮或菜单键(或忽略按键)。The proper way of doing that is with a blocking dialog. In BB API this can be done as follows:
This has the advantage of blocking the GUI: if the user pushes the menu or esc key it doesn't have any effect.
If you want to do it in your screen without dialogs, then you can add an empty
VerticalFieldManager
which you can fill with a label when the message has to be shown. This way, instead of updating the entire screen, only the Manager is refreshed. But then you should write the logic to not letting the user push any button or menu key (or ignoring key press).