Dialog Survival Over Configuration Change

by Marco Nelissen » Thu, 05 Mar 2009 01:22:00 GMT


Sponsored Links
 


Why do you say that? Opening or closing the keyboard counts as a
configuration change, so it's something that can happen at any time.


Unless you take measures to avoid it, a configuration change will
cause your activity to be destroyed and recreated with the new
configuration. It goes through the normal activity lifecycle when
doing this, so to the current activity is paused, stopped and
destroyed, and the new activity is created, started and resumed.

--~--~---------~--~----~------------~-------~--~----~



Dialog Survival Over Configuration Change

by Romain Guy » Thu, 05 Mar 2009 02:57:05 GMT


 orry I got confused, you want removeDialog(), not dismissDialog().
The latter only closes the dialog but it is still known as a managed
dialog. removeDialog() on the other hand tells the Activity to forget
about the dialog *and* to dismiss it.

On Wed, Mar 4, 2009 at 10:53 AM, Nmix <nepean...@gmail.com> wrote:



--
Romain Guy
Android framework engineer
romain...@android.com

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

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Dialog Survival Over Configuration Change

by Dianne Hackborn » Thu, 05 Mar 2009 10:23:58 GMT


  think you are getting yourself into a more and more tangled mess.  As a
fairly broad rule, you shouldn't be doing any state-changing behavior in
onSaveInstanceState() -- this is not for the system to tell you about
something interesting happening, but for it to get your current state at
whatever point it thinks it might need it.

Could we back up and look at exactly what you are trying to do? In which
situations do you want the dialog to stay, and in which do you want it to
disappear? This shouldn't be in terms of "when state is saved" or "when it
is destroyed", but "when the user flips the lid / changes the
configuration," "when the user presses home," "when the user switches to
another activity," etc.

On Wed, Mar 4, 2009 at 5:28 PM, Nmix <nepean...@gmail.com> wrote:



--
Dianne Hackborn
Android framework engineer
hack...@android.com

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.

--~--~---------~--~----~------------~-------~--~----~



Dialog Survival Over Configuration Change

by Romain Guy » Fri, 06 Mar 2009 13:14:13 GMT


 gt;> It is a problem. In my, and others', opinion it is a *bug* that the

It is a bug indeed.




--
Romain Guy
Android framework engineer
romain...@android.com

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

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Does Droid phone have a defect on message service?

Hi, All,

We happened a problem with Android message only on Droid phone:
        When sending a message,  pop-up a view with "message
sending...", while the screen is become dim sometimes, if pressing the
power button to stop dimming, the pop-up view "message sending.." is
gone, and the message seems not sent out; if sending the message
again, it will show "error sending message";  Seems the action dimming
action cancel the message sending.

   It's only happen on Droid phone, it never happen with Nexus One and
emulators.

Does anybody have similar experience?  Or is it a defect of the Droid
phone?

thanks,

Ernest.

-- 

2. Can't sign my apk after updating sdk 2.2 (and the adt plugin)

Hi all,

I am working on Eclipse on a Mac.

Everything was ok, until I updated the SDK version (and ADT plugin) to
the sdk 2.2.

Now all works ok, even "Export unsigned apk".

BUT - when I select "Export signed pk" from the menu - I get no
response - no dialog, nothing.

Anyone else encountered this ?

Any solution ?

TIA

-- 

3. how to open an App when the Android OS start up

4. how to change an icon of the Tabhost at run time

5. Google's global quick search widget missing in Android 2.2

6. Performance problem with large Bitmap

7. What is Wild (N) for in Contact Number composer?