Two devices, similar densities yet different image sizes?

后端 未结 4 785
伪装坚强ぢ
伪装坚强ぢ 2021-01-28 17:18

Ok here is a problem that is puzzelling me that I really would like you to help me out with. I am testing my app with both HTC amaze and Galaxy S2 (as I know both are High densi

相关标签:
4条回答
  • 2021-01-28 17:33

    The answer is in the numbers right in front of you.

    Source http://www.androidauthority.com/htc-amaze-4g-vs-samsung-galaxy-s-ii-t-mobile-27110/

    In terms of screen size, the Samsung Galaxy S2 has a slightly larger screen with 4.52 inches of display. The HTC Amaze 4G, on the other hand, comes with a screen similar in size to the international variant of the Galaxy S2–4.3 inches.

    The HTC Amaze has a higher resolution, and a smaller physical screen. This results in a higher pixel density- that means smaller physical pixels, because a larger number of them needs to be crammed into a tighter place.

    An image of for example 240x160 would therefore appear smaller on the Amaze.

    The reported DPI values for the S2 is clearly wrong. According to the metrics given it is ' 800/ 160 = 5 inches on the long side, and 480/160 = 3 inches on the short side. This would have given a screen size of sqrt (5 * 5 + 3*3 ) = 5,8 inches.

    The DPI values for The amaze is correct. As we see if we do a simple pythagoras. Sqrt (960/258^2 + 540/256^2) = 4,27"

    As a developer I experience the same thing when moving from my test device HTC sensation, and the S2.

    0 讨论(0)
  • 2021-01-28 17:35

    Would this be related to this issue: https://groups.google.com/forum/?fromgroups#!topic/android-developers/g56jV0Hora0

    0 讨论(0)
  • 2021-01-28 17:47

    I am not sure but the One Solution that i come to know base on your issue is, You have to made the layout as per the Device Screen Resolution.

    As like,

    Galaxy SII Support layout-normal-hdpi

    As like,

    Maybe HTC amaze support layout-large Screen.

    So try to make the Layout as per the Device and it will solved your issue.

    Hope it will help You.

    Other detail that same to your question is here: android-layout-issue-for-htc-evo-3d

    Enjoy Coding. . . . :)

    0 讨论(0)
  • 2021-01-28 17:51

    The xdpi and ydpi on HTC is very high thats why the image is smaller.

    I remember there was a bug that the reported xdpi and ydpi was totaly wrong, and to be honest they look wrong.

    0 讨论(0)
提交回复
热议问题