问题
It seems that my app have problems with its layout only on HTC Sensation (not sure if XL or not). Now, since that device has resolution of 800x480 (and that is supported resolution, showing fine on other devices) - how can I emulate HTC Sensation (+XL) on the emulator?
Or, how can I emulate 4.3" device on the emulator?
回答1:
The Sensation and Sensation XE have a 4.3" 960x540 screen. The XL has a 4.7" 800x480 screen. Your problem may well come from the fact its an XE not an XL and hence you haven't got your screen res correct.
回答2:
This answer might help you: How to create 7" Tablet (1280 * 800) Screen Resolution Emulator in Android?.
Create a new Virtual Device with the following parameters:
First, fix the resolution at 480x800
Modify
Abstracted LCD Density
Playing with the Density and the resolution you will define the screen
The formula is:
DENSITY = sqrt (x^2+y^2)/d where d is the diagonal in inches.
So, supposing you want a d=4'7", then you need a density of:
Density=sqrt(480x480+800*800)/4'7 = 198,499
So, fix the ABSTRACTED LCD DENSITY to 199 and there you are.
来源:https://stackoverflow.com/questions/8908597/android-emulator-htc-sensation-xl