Android - Imageview in center in all screen resolution

Right now, i am developing Android Application using SDK 1.5 and testing application on HTC Hero, its firmware is Android 1.5.

Let me come to actual point: in application, i am having an imageview for displaying image (Image resolution is 320*480), now imageview is displaying image in full-screen perfectly, but when i am trying to test it on HTC EVO 4G (having resolution 480*800), image gets stretch.

So, what i like to do is want to display 320*480 resolution image in all screen-resolution mobile ? i means to say,if the mobile is of higher resolution(i.e. 480*800 , 480*854, or else) than the image should be displayed in "Center" portion of the screen.

So displaying image in Center in all screen (without stretching or cutting) resolution other than 320*480, what attributes i have to set ?

6
задан Paresh Mayani 27 September 2010 в 06:29
поделиться