views:

21

answers:

1

I am developing a Java Android application that displays web content from the assets folder in a web view. I had no problem getting this content to display in the application but I am confused as to why my images are not displaying properly. I'm working with a Motorola Droid that is supposed to be 480x854 resolution. When I create banner images using these dimensions and attempt to display them in the web view they're enormous and they flow off of the screen. It doesn't appear that the web view is actually 480x854. Can somebody let me know what I am missing here? I do not know what size to set the images to so they are just right.

A: 

First of all, never create a layout with exact measurements like that. Use the fill_parent or wrap_content variables in order to get the sizes you want. If you do a 480x854 on one device it may fill the screen, on another it might fill the screen twice over. As to answer your question I'm not sure why it does this. Just stay away from using exact pixel variables like that and the problem will be avoided.

Enigma Development
I did actually use a layout resource that does what you have said. I never specified any dimension parameters anywhere but I do need to use exact pixel dimensions when creating the images. That's where I was creating the images based on the dimensions of the device. On the current project I do not need to worry about device other than this Droid so I want the images to fit exactly.
Ambrose Krapacs