Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Splash Screen

 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have an application where a splash screen comes and go away in 3 secs, it is having a image as well. The problem I am having is I can not get the image to the center of the screen in all models, specially in the nokia phones with different screen sizes, So could you please let me know how to do this. Thank you very much...
 
sivaramakrishna kasimahanthi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this

g.drawImage( imgObj,
getWidth()/2,
getHeight/2,
Graphics.HCENTER | Graphics.VCENTER
);

I assume
g is Graphics Object
imgObj is your image
getWidth will return the widht of the current canvas.
getHeight will return the height of thd cureent cavas.
and the 4th parameter specifies the anchor position.

Hope this will work for you.
 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the answer, it work, Thanks a lot once again....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic