当前位置: 代码迷 >> BlackBerry >> 怎样在手机主屏下弹出一个框显示信息
  详细解决方案

怎样在手机主屏下弹出一个框显示信息

热度:8474   发布时间:2013-02-26 00:00:00.0
怎样在手机主屏上弹出一个框显示信息
各位高手:
怎样在手机主屏上弹出一个框显示信息(就像手机有一条信息,显示有新的信息一样)?
谢谢!
------解决方案--------------------------------------------------------
pushGlobalScreen
------解决方案--------------------------------------------------------
pushGlobalScreen(screen, 0, UiEngine.GLOBAL_SHOW_LOWER);

你报的什么错
------解决方案--------------------------------------------------------
最简单Dialog.alert(msg)
------解决方案--------------------------------------------------------
从异常看,你的应用应该是后台线程。参考以下方法:

 ApplicationManager.getApplicationManager().requestForeground(getProcessId());
可以把自己的screen 移到前台。

参考:开发工具内置的例子程序:ActiveTextFieldsDemo 

            HandlerScreen handlerScreen = new HandlerScreen();
            pushScreen(handlerScreen);
            
            // When this application is launched we want to make it visible by
            // bringing it to the foreground. 
            ApplicationManager.getApplicationManager().requestForeground(getProcessId());

------解决方案--------------------------------------------------------
如果用pushGlobalScreen



Application.getApplication().invokeLater(
  new Runnable() {
    public void run() {
      UiEngine ui = Ui.getUiEngine();
      Screen screen = new Dialog(Dialog.D_OK, "Look out!!!",Dialog.OK, Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION),  Manager.VERTICAL_SCROLL);
      ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_MODAL);
    }
  }
);
------解决方案--------------------------------------------------------
这帖也推荐?
------解决方案--------------------------------------------------------
pushGlobalScreen
------解决方案--------------------------------------------------------
不好意思,能不能详细点
------解决方案--------------------------------------------------------
qmessagebox
------解决方案--------------------------------------------------------
就是弹出一个消息框吗?
------解决方案--------------------------------------------------------
好像说的不清楚啊
------解决方案--------------------------------------------------------
菜鸟路过。。。。。。
------解决方案--------------------------------------------------------
piao 过
  相关解决方案