Let me add to this a little more, in case I give a mistaken impression:

I can't imagine an app that will need to design different layouts for all of
these screen sizes.  In fact, the vast majority of apps only need one
layout, period.  As long as you consider how your UI can be resized when you
design it (from the obvious/easy thing of having a list view or scroll view
holding its main content, to simply positioning and/or centering fixed UI
elements in the overall space), then nothing has changed from a few weeks
ago when the only screen was HVGA.

There also was already a strong motivation to deal with different screen
sizes already, in order to best interact with the IME which ideally will be
allowed to resize the app's UI when it is displayed.  In fact, in our
testing with QVGA devices, the vast majority of apps already work fine on
them, so developers will just need to toggle the flag to say so.  The reason
we don't show such apps by default, though, is because there are some that
have significant issues, there is nothing the platform can really do about
that, and the developer had no reason to expect to run on such a screen, so
we don't want them getting bad reviews on market as a result.

The one screen size that people are most likely to want to take into special
consideration is "large," which represents a screen significantly larger
than a traditional phone screen.  In this case, there are many things an app
may want to do to take advantage of all that new space, rather than just
show more data in a list (with very wide items).  This isn't critical,
because you certainly can just let your app resize, or even live with the
system's compatibility mode of putting it in a postage stamp on the larger
display, but it may be worth starting to think about.

On Thu, Sep 17, 2009 at 9:52 AM, Dianne Hackborn <[email protected]>wrote:

> It's not a hack, its telling the linear layout to do the kind of stuff that
> it does: reserve no space for that view (height=0), but give it all
> remaining space (weight=1 and all other views left with the default
> weight=0).
> And yes, this is a typical way of building a UI that can deal with
> different sizes (if you don't already have a list view or some other
> scrollable container with the bulk of the data).  And it's not just
> different screen sizes: it allows you to resize your UI when the soft
> keyboard is displayed, when switching between landscape and portrait, etc.
>  A good example to look at is the contacts edit screen.
>
> As of 1.6, there will also be new layouts for different screen sizes, but
> you need to avoid relying on this for resizing because there is not one
> resource for every possible size, and even with similar screen sizes being
> combined the sheer number you would need to do is overwhelming:
>
> layout-small
> layout-small-land
> layout-normal
> layout-normal-long
> layout-normal-land
> layout-normal-long-land
> layout-large
> layout-large-long
> layout-large-land
> layout-large-long-land
>
> On Thu, Sep 17, 2009 at 3:16 AM, Mihai Dumitrache <[email protected]>wrote:
>
>>
>> Hello,
>> Thanks. I don't know if this is a hack (it looks like at least for
>> me), but it's cool.
>> I would ask you if this is how you really build you layout on
>> android ? using scrollview for stretching views on different screen
>> sizes, or is there some official guidelines to follow.
>> Is there some kind of way to create custom layouts for different
>> screen sizes(qvga, hvga), just like layout and layout-land folders ?
>>
>> Thanks again.
>> >>
>>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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