Shouldn't he be listening for the change configuration broadcast event
rather than just checking a flag? Or perhaps he should declare that he
handles it himself, and handle it in onConfigurationChanged(config).
In that case, he can read the new configuration from config.

But when I see people simply asking how to check the current
configuration (in this case screen orientation), it -sounds- like they
have misunderstood how Android approaches this issue. Then they will
be blind-sided when they find onCreate() being called when the user
tilts his phone.

On Feb 2, 3:50 pm, Mark Murphy <[email protected]> wrote:
> If you load a layout resource via setContentView() or a
> LayoutInflator, Android will choose the right resource automatically
> based on orientation.
>
> If you are generating your UI directly in Java code, either switch to
> using layout resources, or use the orientation field on the
> Configuration object to find out what the current orientation is.
>
> On Wed, Feb 2, 2011 at 6:45 PM, kiros88 <[email protected]> wrote:
> > Hi so im going to make a layout for both horizontal and vertical
> > layout but im trying to figure out right now is how u make the system
> > know when i guess u create it? is there a way to check programmically?
>
> > --
> > 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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2

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