×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    13

    How to fit an image centrally on device screens of different sizes

    Hi,
    I am having an image on canvas, and i want to place it centrally on the screen, please tell me how to make it dynamic so that it can fit all the device screens centrally.
    how to set the co-ordinates for it ?

    thanks
    vinay

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to fit an image centrally on device screens of different sizes

    Code:
    g.drawImage(img, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.HCENTER);
    Graham.

Similar Threads

  1. WLAN Connection from Emulator
    By capri07 in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2007-12-13, 05:13
  2. Bluetooth Security: What exactly is an untrusted device?
    By rahulmcs in forum Bluetooth Technology
    Replies: 1
    Last Post: 2005-12-02, 06:26
  3. How to fit image?
    By Natsumi in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2004-05-17, 04:19
  4. Replies: 3
    Last Post: 2004-04-20, 07:40
  5. Reducing PNG image sizes
    By vikrambk in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2003-04-14, 08:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×