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. how to order unlocked unit as developer?

how to order unlocked unit as developer?
please send link if u know

tx,

duke

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

2. Anyone looking at Cell Broadcast on the G1?

Hello:

Is anyone looking at the Cell Broadcast capability (if any) of the
G1?

Mandatory Wikipedia entry on Cell Broadcast
http://en.wikipedia.org/wiki/Cell_Broadcast

Cell Broadcast Forum

Note: cell broadcast is NOT SMS (text messaging). It is a location-
aware/specific broadcast mechanism built in to most modern GSM phones.
And it is *not* in wide use around the world (yet).


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

3. Detect TAB key?

4. Dealing with Microsoft Exchange support

5. Merge file

6. google Calendar API test problem

7. Getting numbers from a single contact