On Fri, Jan 21, 2011 at 5:07 PM, Chris Adamson <[email protected]>wrote:

>
> One of the things that really came out of Dick and Joe's discussion
> has to do with layouts.  In AWT and Swing, we had LayoutManager
> classes to do layout, while from what I can gather, Android uses XML
> files to describe layouts.


These two things are orthogonal: you have layout managers that support or
don't support relative positioning and then you have the way you describe
your layouts. Android has relative layout managers and supports both XML and
code to describe your layout. Not sure about iOS.


> I think the idea is similar though: you
> describe view objects' relative positions to one another, their
> stretch behaviors, and so on.  This has the advantage of working at a
> lot of different sizes and shapes, or across platfoms where UI
> elements and fonts may have different metrics


Yes, but it only goes so far. When you make a big jump in resolution (not in
density), you really need to rethink your layout completely. For example, a
phone application run as is on a tablet will look horrible probably because
it will feature a huge widget in the middle of the screen.

In other words, when you write your code for a phone and a tablet, you will
need to provide two different layouts, on top of using relative layout
managers and device independent measurements for your widgets.


> Since iOS devices operate with known screen sizes and consistent
> widget metrics, its tools allow you to place widgets at specific
> coordinates.


At least until the next version, which is rumored to come out in a few
months.

Also, I'm sure it is allowed to use absolute layouts, but I'm hoping it's
not the recommended way, because we all know where this leads.

-- 
Cédric

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" 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/javaposse?hl=en.

Reply via email to