I've got a complex problem I've been thinking over for a while. The core issue is that I've got a background for my app which I would like to maintain its aspect ratio, yet at the same time use as much of the background as possible. My current solution, which is less-than- ideal, is to simply use the default android:windowBackground style, which simply fills the background; so on some screens it looks fine, and on others the aspect ratio is a little wonky.
One important thing to note is that the background isn't being used for anything but as a background. I know some people use the background as a board for games... this isn't a case like that. In this situation, the aspect ratio keeps the image looking nice, nothing more. Anyways, I've come upon an interim solution, which is to use a BitmapDrawable with Gravity set on it to center. However, while this maintains aspect ratio, it presents a few problems: 1. I have to create multiple images, one for each possible overall screen size (small, medium and large). 2. Depending on the image, it won't necessarily take up the entire space. For example, if I make a 480x854 (for Droid) background image, some of the vertical space will be chopped off on an N1. What I'd like - and I'm not sure if this is possible - is for the background to fill vertically, maintain the horizontal resolution based on the modifications made vertically, then to be centered. In other words, the horizontal part may be clipped, but the vertical part will always be 100%. Is any of this doable? Is there a better solution to this problem I'm not aware of? -- 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

