1. Are you ready for the Galaxy S20? Here is everything we know so far!

Multiple Screen Support - Screen Width

Discussion in 'Android Development' started by moap, Feb 17, 2011.

  1. moap

    moap Newbie
    Thread Starter

    Hi all,

    I'm working on a game and got stuck with something. The whole scenario depends on the screen width and i developed the game on a 420 px width phone. I want to know whether or not i can force/change resolution, density or something to make phone screen width fit 420 px.
     



    1. Download the Forums for Android™ app!


      Download

       
  2. JamTheMan

    JamTheMan Well-Known Member

    You cant change the resolution of the screen, but you can scale your graphics to fit the screensize. To read the screens size call something like this on the running activity:

    Code (Text):
    1.  
    2. screenX = getResources().getDisplayMetrics().widthPixels;
    3. screenY = getResources().getDisplayMetrics().heightPixels;
    4.  
     
Loading...
Similar Threads - Multiple Screen Support
  1. Arunava Bhowmik
    Replies:
    2
    Views:
    416
  2. chethan1703
    Replies:
    0
    Views:
    356
  3. Thegreenpan
    Replies:
    0
    Views:
    2,077
  4. Muffi Zainu
    Replies:
    2
    Views:
    405
  5. arnolds9
    Replies:
    0
    Views:
    352
  6. ThomasGLu
    Replies:
    0
    Views:
    891
  7. App Update
    Replies:
    2
    Views:
    255
  8. Senthil Kumar P
    Replies:
    2
    Views:
    950
  9. joeschmidt97
    Replies:
    3
    Views:
    643
  10. BewareWolf
    Replies:
    1
    Views:
    1,569

Share This Page

Loading...