KuixInitializer - SplashScreen Image

3 messages - 818 views

I am very new to Kuix and J2ME so be gentle with me.

I would like to replace the "Loading" message when a Kuix application is initialising.  I ideally I would like to override the method getInitializationImageFile() to return the path to an image instead of the default null, so this is what I have added to my KuixMIDLet:

public String getInitializationImageFile()    {
     return "/img/splash_screen.png";
}

This appears to work but the image only appears on screen for less than 1 second whereas the none overridden message "Loading" stayed on screen for over a couple of seconds, is this expected?  Is the above code correct??  What is the preferred way of achieving a "Loading" splash screen???

Many thanks

John 

the getInitializationXXX functions are used only in initialization process. The duration of this porcess depends of the power of the phone where you run the application. You can't control this duration.

Else because the init image is loaded first, the bigger the image is, the longer the loading of this image will be. The best way would be to use here a very small image.

Alternatively, you can use the Kuix.splash(int duration, Widget content, String onCloseAction) method to control the duration of an high definition splash screen. This splash is displayed after the initialization process.

you can do this:

1、 check out kuix source

2、modify  KuixMIDlet in package org.kalmeo.kuix.core;

3、modify mothod

/* (non-Javadoc)
  * @see org.kalmeo.kuix.core.KuixInitializer#getInitializationImageFile()
  */
 public String getInitializationImageFile() {
  //return null;

  return "/img/loading.png";
 }

4、modify mothod

/* (non-Javadoc)
  * @see org.kalmeo.kuix.core.KuixInitializer#getInitializationMessage()
  */
 public String getInitializationMessage() {
  //return "正在载入...";
  return "";
 }