On Thu, Nov 27, 2008 at 3:29 PM, Stoyan Damov <[EMAIL PROTECTED]>wrote:

> On Fri, Nov 28, 2008 at 1:23 AM, Ralf <[EMAIL PROTECTED]> wrote:
> > On Thu, Nov 27, 2008 at 11:39 AM, Stoyan Damov <[EMAIL PROTECTED]>
> wrote:
> >> I also don't want my activity to get restarted when the screen
> >> orientation changes, so I set the "Config changes" attribute to
> >> "mcc|mnc|locale|touchscreen|keyboard||fontScale"
> >> and handle onConfigurationChanged myself. That's great too.
> > You only need to check for keyboardHidden|orientation.
> I don't want my app restarted when any of these settings change - e.g.
> I don't care if user switched locale, MCC, MNC, etc.


Please don't do this.  If, when your app is restarted due to these changes,
it to breaks, then it will also break when the user moves to another app and
then returns to yours and it needs to be restarted.  There is simply no
reason to do this kind of thing except to hide bugs in your app, which users
will eventually encounter.

As far as finding out if the user tried to put your app in an orientation it
is not allowing...  no, there is no way to do this, because you are forcing
a particular orientation, so actually the orientation didn't change at all.

And actually, I'd have to wonder, if you are forcing the orientation one
way, does it really make sense to show a different UI if the orientation
might have changed?  I mean, if you are forcing portrait, and the user opens
the G1 keyboard, and...  well, the screen stays portrait.  Your app still
works.  Why tell them they can't use it when they happen to have the
keyboard open?  Likewise if on some device the orientation is controlled by
the accelerometer, why tell them they can't use your app if they happen to
have the screen angled a certain way?

-- 
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 android-developers@googlegroups.com
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