2011-09-21 3 views

답변

2

왜 10 초 동안 스플래시 화면을 원하십니까? 나는이 같은 화면을 만들어 그것을 할 것

그러나 영원히 같은 그게 .. :

public class SplashScreen extends MainScreen { 
    public SplashScreen() { 
     super(); 
     this.setTitle("loading..."); 
     // add you splash screen images or whatever here 

     final Screen me = this; 
     new Thread(){ 
      public void run() { 
       // do something that takes a long time 
       try { Thread.sleep(10000);} catch (Exception e) {} 

       synchronized (UiApplication.getEventLock()) { 
        Screen next = new YourNextScreen(); // replace with your next screen here 
        UiApplication.getUiApplication().pushScreen(next); 
        UiApplication.getUiApplication().popScreen(me); 
       } 
      } 
     }.start(); 
    } 
} 

는 그런 다음 UiApplcation 클래스에서 스택에 밀어 넣습니다.

2

비트 맵 필드를 추가 할 메인 스크린을 만듭니다. 그리고 다음과 같이 스레드를 실행하십시오 :

Thread th = new Thread() { 
    public void run() { 
    try { Thread.sleep(10000); } catch (Exception ex) { } 
    UiApplication.getUiApplication().invokeLater (new Runnable() { public void run() { 
     //push your screen 
     close(); 
    }}); 
    } 
}; 
th.start(); 
관련 문제