Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 01:38, 25 July 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Full screen Canvas Splash screen in Java ME

From 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 01:38.
87 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×