Hi,

I'm trying to dynamically compute an internal bitmapped font size to
appear at the same size in all devices. However, this is proving to be
quite dificult. I have three devices here:

Htc magic
Motorola Milestone
Motorola Spice

Using

int ydpi = getResources().getDisplayMetrics().ydpi;

... i cannot find a way to measure the height of the screen.

So,

Htc magic has:
screen height in pixels = 480
ydpi = 181
screen height in inches = 2.48

Motorola Milestone:
screen height in pixels = 854
ydpi = 96
screen height in inches = 3.23

Motorola Spice:
screen height in pixels = 320
ydpi = 133
screen height in inches = 2.40

Screen height in inches was measured using a ruler.

I can't find a formula that would translate the screen height in
pixels plus ydpi and get the real screen size in inches.

The only one that makes some sense is the Moto spice, making 2.40 *
133 = 320. All the others returns incorrect results.

Any clues on this?

thanks

     guich


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to