Saturday, June 4, 2011

[android-developers] Actionbar.DISPLAY_HOME_AS_UP causes activity to not call destroy, is this by design?

I have two activities.

1. Home
2. Details

In the details activity I set:
ActionBar actionBar = this.getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);

and this causes the top left icon to act as a home button.

But what I hadn't anticipated was that the details activity isn't
destroyed when pressing the home button. If I press the back button
then the activity is destroyed.

Can anyone explain why the details activity isn't destroyed? Do I need
to intercept the user clicking the home button and destroy the
activity myself since I want to cleanup the image resources it uses...

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate