You should pretty much never do anything based on the system-reported screen
size, since there can be any number of arbitrary decorations around the
screen -- we already have the status bar on the G1, soon there will be an
input method of arbitrary size that slides up from the bottom, other devices
could easily have other things on the left or right sides that take a chunk
out of the screen.

The correct way to do this is to work with the layout system by handling the
layout operation of a view and performing layout based on the size you are
given there.

On Wed, Jan 28, 2009 at 3:25 PM, Sundog <[email protected]> wrote:

>
> You can of course use AbsoluteLayout if you virtualize all the
> coordinates and calculate them on the fly based on the system-reported
> screen size. For some apps (like mine) there is no alternative to
> AbsoluteLayout.
>
> On Jan 28, 3:53 pm, Dianne Hackborn <[email protected]> wrote:
> > You can actually use any layouts except AbsoluteLayout. :)
> >
> > On Wed, Jan 28, 2009 at 1:27 PM, [email protected] <
> >
> >
> >
> >
> >
> > [email protected]> wrote:
> >
> > > Hi Dianne,
> >
> > > thanks for your statement!
> > > and, sure, about using relative layouts wherever possible.
> >
> > > thanks -
> >
> > > On Jan 28, 9:35 pm, Dianne Hackborn <[email protected]> wrote:
> > > > Android currently runs on 320x480 / 480x320 screens, and that is all.
> > > > Whenever the platform supports smaller screens, it will need to
> ensure
> > > that
> > > > existing applications run acceptably there.
> >
> > > > So basically assume the G1 screen and don't sweat the noise you hear.
> > >  The
> > > > only caveat is that we strongly recommend you use layout managers
> instead
> > > of
> > > > absolute layout of your UI, so you can take advantage of any
> additional
> > > > space on a larger screen (especially something that is a bit
> taller/wider
> > > > for a wide screen display) without it going to waste.
> >
> > > > On Wed, Jan 28, 2009 at 12:03 PM, [email protected] <
> >
> > > > [email protected]> wrote:
> >
> > > > > Hi there,
> >
> > > > > I wonder whether there is a minimal display resolution I can expect
> > > > > for Android programs.
> >
> > > > > Especially with the news about the Kogan Agora, which is said to
> have
> > > > > too low a resolution at 240 x 320.
> > > > > And then again there come emulator skins with exactly that
> resolution
> > > > > with the SDK.
> >
> > > > > Now, should I make sure that applications work and look well on 240
> x
> > > > > 320
> > > > > or can I expect larger resolution on actual devices?
> >
> > > > > thanks -
> >
> > > > --
> > > > 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.  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.  All such questions should be posted on public
> > forums, where I and others can see and answer them.- Hide quoted text -
> >
> > - Show quoted text -
> >
>


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