开发者

Blackberry splash screen delay before appears

开发者 https://www.devze.com 2023-02-18 19:36 出处:网络
I need to display a splash screen when I app instantiate, I wrote a class for splashScreen based on blackberry develpers knowlwdebase (link).

I need to display a splash screen when I app instantiate, I wrote a class for splashScreen based on blackberry develpers knowlwdebase (link).

And its invoked from my following class.My problem is the splashscreen appears onl开发者_开发问答y after a deley,How can I solve it,If any one have idea Please help me,Thanks

class Test extends MainScreen{

Test(){

UiApplication.getUiApplication().invokeLater(new Runnable() 
        {
            public void run() {
                UiApplication app=(UiApplication)getApplication();

                Bitmap image = Bitmap.getBitmapResource("splah.png");
                ListView listView = new ListView();
                new SplashScreen(app, listView );

}

}


Try synchronized (UiApplication.getEventLock()). It is faster than invokeLater.

Test(){
synchronized (UiApplication.getEventLock()) {
UiApplication app=(UiApplication)getApplication();
Bitmap image = Bitmap.getBitmapResource("splah.png");
ListView listView = new ListView();
new SplashScreen(app, listView );

}

}
0

精彩评论

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

关注公众号