Among other things, my app displays photos in an ImageView in a popup Dialog. These images come out of a database that is created on the user's PC. Before storing them in the database, I resize them for max dimensions of 320x320 pixels.

So, in almost all cases, on the Android device I simply display the photos at their "natural" dimension, which fits nicely on almost all screens. However, I have at least one customer with an HTC Wildfire which, even though its screen is 3.2", has only QVGA dimensions (240x320). With my current code, the photos do seem to be resized by the system to display within the screen boundaries, but the rest of the views in the dialog (caption, buttons, etc.) get "pushed off the screen" and are not visible or usable.

Obviously I need to handle this case by setting some specific dimensions on the ImageView when running on a QVGA device, but what is the best approach? Should I use DisplayMetrics to discover the dimensions and adjust accordingly? This would work, but seems like it might be too low-level of an approach. Could I put dimension the image in the XML in some way using "dips"?

(By the way, it's interesting that Android considers this class of display to be a "small screen" for Manifest purposes, but at 3.2" it's not physically all that smaller than a lot of other devices with higher res.)

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to