×
Namespaces

Variants
Actions

Full screen Canvas Splash screen in Java ME

From Nokia Developer Wiki
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 (25 Jul 2013)
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 25 July 2013, at 04:38.
97 page views in the last 30 days.
×