In Blackberry OS 5.0 , Is there any UI Handler to update UI of the Screen

我只是一个虾纸丫 提交于 2019-12-25 18:18:09

问题


I am developing an app with Blackberry OS 5.0. Is there any UI Handler(like in android) which updates the UI of the present screen. I am using thread's in my app,when a thread is running at the same time i need to update my UI of the screen. Right now,after my thread is completed, i am popping the present screen and push the new screen again. Then only my UI is getting updated. Is there any alternative way to update UI when thread is running.


回答1:


Yes, there's a much better way of doing it: Perform your updates on the UI thread. Example:

Application.getUiApplication().invokeLater(new Runnable(){

    public void run(){
        editField.setText("My updated text");
    }
}



回答2:


You need to invalidate the UI and update the UI you can also delete all Ui and reload it for particular condition. like getmainManger.deleteAll();

This method delete all UI and you can load new UI and update all UI.



来源:https://stackoverflow.com/questions/12088189/in-blackberry-os-5-0-is-there-any-ui-handler-to-update-ui-of-the-screen

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!