Timaphei wrote:Hi guys,
I used all above suggestions of how to determine the size of the screen.
This is what I get:
on Motorola Droid: 569x320 (actual size is 854x480)
on Nexus One: 533x320 (actual size is 800x480)
What is wrong?
These values are correct. The methods to determine the screen size gives the sizes in dip. To get the pixels (sizes quoted by manufacturers), you need to do the operation below.
pixels = dips * (density / 160)
The 2 phones have a density of 240 so, if you take the height of the Motorola for example, your height in pixels is going to be 569 * 240 / 160 = 854.
Refer to Supporting Multiple Screens
- scroll down to Overview of Screen support/terms and concepts and read the "density-independent pixel (dip)" paragraph for info.
This is slightly confusing but it stems back from when Google Android only supported 160 density screens.