Namespaces
Variants
Actions

Full screen Canvas Splash screen in Java ME

Jump to: navigation, search

This code snippet shows how to create a full screen splash screen in Java ME using the Canvas.

Article Metadata

Article
Created: honest_success (28 Jul 2009)
Last edited: hamishwillee (12 Oct 2012)
Splash2.jpg

Implementation

To implement it you will have to do following things.

  1. Create the class which extends canvas
  2. Set the color inside paint method
    g.setColor(0xffffff);
  3. In paint() first draw the Square using width and height of the mobile screen
    g.fillRect(0, 0, width, height);(0xffffff);
  4. Create Image:
    sp=Image.createImage("/Splash.png");
  5. Draw the image at the center of the screen
    g.drawImage(sp, width / 2, height / 2, Graphics.VCENTER | Graphics.HCENTER);

Limitation Of Alternative

Some applications display a splash screen using alert but that does not display it in full screen and generally this lacks the professional look.

This page was last modified on 12 October 2012, at 02:04.
152 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved