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 screen pixel ratio.

<ImageView
            android:layout_gravity="center"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:src="@drawable/my_background"
            android:scaleType="centerCrop"
            />

On Sep 17, 1:43 am, Kumar Bibek <[email protected]> wrote:
> 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 screens.
>
> But, it really depends on your background image.
>
> -Kumar Bibekhttp://techdroid.kbeanie.com
>
> On Sep 17, 1:36 pm, Thierry Legras <[email protected]> wrote:
>
>
>
> > 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 <[email protected]>
>
> > > 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 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]<android-developers%2Bunsubs
> > >  [email protected]>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Thierry.

-- 
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

Reply via email to