Hi Folks,

I have read through the "Supporting Multiple Screens" (http://
developer.android.com/guide/practices/screens_support.html) tutorial
and have some questions.

Basically, I am trying to figure out the proper sizes for my content,
especially images, such that it will fit in the smallest screen type
[QVGA - 240x320, 120DPI].  I am sizing my images using Device
Independent Pixels (DIPs).  I'd like to understand what the maximum
number of DIPs would be for the QVGA screen.

Based on the tutorial above, I believe that DIPs can be calculated as
follows:

# of DIPs = # of Physical Pixels / (density/160)

Thus, for the QVGA screen type, I would expect the following number of
DIPs:

Width: # of DIPs = 240 / (120/160) = 320
Height: # of DIPs = 320 / (120/160) = ~427

To test things, I setup a simulator on my computer by launching the
Android emulator as follows:
  - "emulator -avd avdQVGA -scale 81dpi"
  - Where "avdQVGA" is an AVD I setup via Eclipse to be a QVGA screen.
  - My monitor has a DPI of 96.

Finally, I put in 400 DIPs worth of vertical images and margins.  I
was surprised to find that the content spilled over the bottom of the
screen (i.e. it didn't all fit).  I expected to be able to squeeze
~427 DIPs worth of content into this screen.

Is there something wrong with my ~427 DIP calculation?  Can someone
please explain why my 400 DIPs of images/margins do not fit on the
screen?

Help with this would be most appreciated.  I'd like to understand
where I have gone wrong.  I can provide more details on my test
project if required.

Thanks,

/Cranke


-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to