[android-developers] Re: Maintaining Aspect Ratio of Background Image

2010-09-17 Thread jean-guy
How about using an ImageView with a centerCrop? We do this with an original image sized at 3:2 aspect. The image is cropped on 16:9 devices but maintains aspect ratio. Be sure to test so you know nothing important has been cropped out. As mentioned above 16:9 is a pretty safe bet for a limit on

[android-developers] Re: Maintaining Aspect Ratio of Background Image

2010-09-17 Thread Kumar Bibek
Well, if your background image is simple enough, may be with a text, pr picture at the center, easily separated from the remaining background, you can actually achieve a certain level of flexibility by making it a 9 patch png. In such a case, you can have just one image, that caters to all the scre

Re: [android-developers] Re: Maintaining Aspect Ratio of Background Image

2010-09-17 Thread Thierry Legras
Thanks Bret. Will do something like that. I hope Android will have more options to define a background with multiplication of terminals and upcoming pads. Thierry. 2010/9/17 Bret Foreman > I made a landscape and a portrait version of my background image and > designed them both to look ok (no

[android-developers] Re: Maintaining Aspect Ratio of Background Image

2010-09-16 Thread Bret Foreman
I made a landscape and a portrait version of my background image and designed them both to look ok (not great but ok) when squished to square. And square is the worst case unless some particular phone implementation is completely illogical. -- You received this message because you are subscribed

Re: [android-developers] Re: Maintaining Aspect Ratio of Background Image

2010-09-16 Thread Thierry Legras
Hi, I have the same issue. Indeed it seems quite a common request without any easy solution. Anyone has a code snippet based on Frank suggestion (or other solution)? Thanks for any help, Thierry. 2010/7/7 Daniel Lew > I hadn't considered that, but then you can't reference the image in > the th

[android-developers] Re: Maintaining Aspect Ratio of Background Image

2010-07-07 Thread Daniel Lew
I hadn't considered that, but then you can't reference the image in the theme (which allows the background to load faster). I might give that a shot, though. -Daniel On Jul 6, 9:17 pm, Frank Weiss wrote: > No worries. > > 16x9 (a la Droid) is probably the most extreme screen aspect ratio > you'

Re: [android-developers] Re: Maintaining Aspect Ratio of Background Image

2010-07-06 Thread Frank Weiss
No worries. 16x9 (a la Droid) is probably the most extreme screen aspect ratio you'll ever encounter in an Android device. Have you considered creating a scaled and cropped image on the fly the first time the app is run and caching that on the SD card? -- You received this message because you ar

[android-developers] Re: Maintaining Aspect Ratio of Background Image

2010-07-06 Thread Daniel Lew
You're making some assumptions about what I'm assuming. The whole reason this problem has come up is *because* phones have differing aspect ratios. My question has very much so to do with the possibility of a square display - if one comes up, then I want to be able to keep the aspect ratio of the