rukiman wrote: > This is working almost 90% for my game except when testing in WVGA > screen resolution, all my images are scaled incorrectly, it is longer > vertically than horizontally. I was expecting the screen compatibility > to maintain aspect ratios as that of HVGA.
No. "DROID has been optimized to display wide-screen multimedia (movie) content at its native aspect ratio of 16/9. This is different from the HVGA aspect ratio of 3/2, which is the traditional computer screen format. What this means is that when content is scaled up to "full screen", the horizontal (X*1.5) and vertical (Y*1.77) scaling factors are different. As a result, when displaying the same bitmap as a full screen background, round circles can appear as ovals, and squares are elongated to rectangles." http://developer.motorola.com/docstools/library/Support_for_Multiple_Screen_Resolutions/ I have no reason to believe this is DROID-specific, but rather is how Android scales things in WVGA800/WVGA854, when you do not supply your own pre-scaled resources. > Also in my layout I have a scrollview and it is designed in such a way > that in HVGA when it is not scrolled down, the items are hidden away, > however now in WVGA those things are shown. If the aspect ratio of > HVGA is maintained I won't have this issue. > > How can I make sure the aspect ratio is maintained? You cannot control the aspect ratio, as that is dictated by the physical parameters of the screen. AFAIK, there is no Android equivalent of "letterbox" that would put black bars on either side of your app and give you a smaller virtual screen with 3/2 aspect ratio. > Also in my layout I am positioning some items using pixel positions. > Should I convert these to dpi? If you mean dip (density-independent pixels), perhaps. It depends on what the pixels represent. There is no hard-and-fast rule. > How do I calculate what dpi they should be? 1px = 1dip at 160dpi (i.e., traditional "normal" screen density). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! -- 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

