[android-developers] Re: Droid slide event callback method

2010-11-12 Thread DraganA
Sorry, yes, by the slide, I meant the hardware keyboard. Now, if this
is indeed an orientation change event, in theory it shouldn't be
breaking my app since I have fixed the orientation to portrait in my
application xml. Or maybe there is some kind of override on Droid
phones related to the orientation...
Thanks

On Nov 12, 12:49 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Nov 12, 2010 at 5:05 AM, DraganA dand...@gmail.com wrote:
  I'm having crash reports on Motorola Droid phone which force closes my
  app when the slide is open or closed.

 What is the slide?

  I don't have the phone and can't
  test it. I was wondering if anyone know what kind of event occurs and
  if any activity callback method is called for those events.

 If the slide is the hardware keyboard, that is an orientation change.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Droid slide event callback method

2010-11-12 Thread Mark Murphy
On Fri, Nov 12, 2010 at 9:02 AM, DraganA dand...@gmail.com wrote:
 Sorry, yes, by the slide, I meant the hardware keyboard. Now, if this
 is indeed an orientation change event, in theory it shouldn't be
 breaking my app since I have fixed the orientation to portrait in my
 application xml.

Actually, you fixed the *display* to portrait. This means that if the
user changes the device orientation, your display does not change
orientation to match.

However, your activity will still be destroyed and recreated. Why this
is, I have no idea.

So, you still need to do something to deal with orientation changes
(onSaveInstanceState(), onRetainNonConfigurationInstance(), etc.).
Perhaps there is a bug somewhere in your activity in this area.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Droid slide event callback method

2010-11-12 Thread DraganA
Thanks for that. Since my app is fixed to portrait, I now prevent
onCreate being called on orientation change by setting
android:configChanges=orientation|keyboardHidden in the app xml.
This will hopefully fix it.

On Nov 12, 2:15 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Nov 12, 2010 at 9:02 AM, DraganA dand...@gmail.com wrote:
  Sorry, yes, by the slide, I meant the hardware keyboard. Now, if this
  is indeed an orientation change event, in theory it shouldn't be
  breaking my app since I have fixed the orientation to portrait in my
  application xml.

 Actually, you fixed the *display* to portrait. This means that if the
 user changes the device orientation, your display does not change
 orientation to match.

 However, your activity will still be destroyed and recreated. Why this
 is, I have no idea.

 So, you still need to do something to deal with orientation changes
 (onSaveInstanceState(), onRetainNonConfigurationInstance(), etc.).
 Perhaps there is a bug somewhere in your activity in this area.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 Available!

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en