diff --git a/res/splash.png b/res/splash.png new file mode 100644 index 0000000..2aaf18a Binary files /dev/null and b/res/splash.png differ diff --git a/src/ui/screens/SplashScreen.java b/src/ui/screens/SplashScreen.java index f2d7951..d1e2526 100644 --- a/src/ui/screens/SplashScreen.java +++ b/src/ui/screens/SplashScreen.java @@ -2,19 +2,28 @@ import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Graphics; +import javax.microedition.lcdui.Image; import App; public class SplashScreen extends Canvas { + private Image splash; + public SplashScreen() { setFullScreenMode(true); + try { + splash = Image.createImage("/splash.png"); + } catch (Exception e) { + } } public void paint(Graphics g) { g.setColor(-1); g.fillRect(0, 0, getWidth(), getHeight()); - // TODO: иконку + if (splash == null) + return; + g.drawImage(splash, getWidth() >> 1, getHeight() >> 1, Graphics.VCENTER | Graphics.HCENTER); } public void keyPressed(int key) {