Can't reproduce htc sensation XL in emulator or perhaps yes ?

moster67

Expert
Licensed User
Longtime User
I have a user who is testing a remote-control for me. He's got a HTC Sensation XL with the following specs:

480 x 800 pixels, 4.7 inches (~199 ppi pixel density)

(which is different from other HTC Sensations models)

I tried to set up the emulator as follows to simulate the device:

Skin: 480x800
LCD Density: 199

(as per the following instructions: java - Android Emulator - HTC Sensation XL - Stack Overflow )

So far so good but when comparing his screen-shots against what I see in the emulator, they seem very different. See screen-shots below:

The one on the left is the screen-shot from the user while the one on the right is from the emulator.

I wanted to check out why the letters/numbers (text) I have put in the buttons are being cut off on his device while I see them correctly on the emulator. In any case, the resolution between his screen-shot and the one from the emulator seems to be far too different. Did I fail to set up the emulator correctly? If not, what could be the problem?

BTW: I am using only one layout in the designer, namely 240x320 which however seems to scale very well on all different resolutions I have been trying. Then I simply center the scrollable panel (the Remote Control) by code. But this shouldn't matter, since it is the same code running on his device as on the emulator.

Any advice would be appreciated. Thanks!
 
Last edited:

moster67

Expert
Licensed User
Longtime User
OK, I got the following values:

480x800, scale = 1.5 (240 dpi )

He told me he got the device from a friend and I am ready to bet his friend has changed dpi-settings (as per the following procedure: xda-developers - View Single Post - [ROM][26 JAN]COREDROID SENSATION XL v1.1 [SENSE 3.5][FAST|SMOOTH] ONLINE!).

Well at this point, I guess I can't really do much since with said DeviceLayoutValues he has same values as me although my letters/numbers are not cut off. Maybe his device is also using a different system-font (type-face)? Is it possible to check the system-font in use? The idea could be to check for DeviceLayoutValues AND system-font and if different from standard system-font, then maybe loop through all buttons and reduce font-size by one. Is this possible?
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Thanks Erel!

I will experiment with Canvas.MeasureStringWidth / Height as you suggested and see what I can do.
 
Upvote 0
Top