开发者

How can I use A dialog with No BUTTON and automatically Closes? On BlackBerry

I need to use a dialog. That appears 2-3 seconds and after closes automatically. Which object should I use On Black开发者_开发知识库Berry?


you can also use

Status.show(String message) 

Shows a status screen for two seconds.

or

Status.show(String message, Bitmap bitmap, int time) 

Shows a status screen with specified icon, for specified time.


Create a class that extends PopupScreen and use a TimerTask to automatically close it. So you would have code in your constructor that looks sort of like this:

    Timer timer = new Timer();
    timer.schedule(new TimerTask(){

        public void run()
        {
            if(TestScreen.this.isDisplayed())
            {
                synchronized (Application.getEventLock())
                {
                    TestScreen.this.close();
                }
            }
        }

    }, WAIT_TIME_IN_MILLISECONDS);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜