![]() | | ||||||||
| | #1 |
| Warrior Member Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
how to change the startup logo of a phone Here is the listing of my code. Can some help: //MIDlet-Name: startupScreen //MIDlet-Version: 1.0 //MIDlet-Vendor: MyCompany //MIDlet-Jar-URL: StartupScreen.jar //MIDlet-1: startupScreen, startupScreen //MicroEdition-Configuration: CLDC-1.0 //MicroEdition-Profile: MIDP-1.0 //MIDlet-JAR-SIZE: 100 import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class startupScreen extends MIDlet { private Display display; private MyCanvas canvas; public startupScreen (){ display = Display.getDisplay(this); canvas = new MyCanvas (this); } protected void startApp() { display.setCurrent( canvas ); } protected void pauseApp() { } protected void destroyApp( boolean unconditional ){ } public void exitMIDlet() { destroyApp(true); notifyDestroyed(); } class MyCanvas extends Canvas implements CommandListener { private Command exit; private startupScreen startupScreen; private Image image = null; public MyCanvas(startupScreen startupScreen) { this. startupScreen = startupScreen; exit = new Command("Exit", Command.EXIT, 1); addCommand(exit); setCommandListener(this); try { image = Image.createImage("/myImage.png"); } catch (Exception error) { Alert alert = new Alert("Failure", "Can’t open image file.", null, null); alert.setTimeout(Alert.FOREVER); display.setCurrent(alert); } } protected void paint(Graphics graphics) { if (image != null) { graphics.drawImage(image, 0, 0, Graphics.VCENTER | Graphics.HCENTER); } } public void commandAction(Command command, Displayable display) { if (command == exit) { startupScreen.exitMIDlet(); } } } } |
| | |
![]() |
|
| Tags |
| change, logo, phone, startup |
| Thread Tools | |
| |
![]() |