On Sun, Sep 5, 2010 at 6:49 PM, Sebastián Treu <[email protected]> wrote: > I what performance concern, will using FLAG_ACTIVITY_NO_HISTORY make > any changes? I mean, does the framework loads the task to the activity > costly or not? I ask this just for curiosity and to know a little > more, as one could think of launching the Activity with that flag if > it's known that there's no need to keep it in the stack as later on it > will be finished.
I would expect that FLAG_ACTIVITY_NO_HISTORY, android:noHistory, and the finish() technique that I and Mr. Weiss mentioned would have similar performance characteristics. The difference between them appears to be: -- FLAG_ACTIVITY_NO_HISTORY is good when the *caller* (the one invoking startActivity()) is one making the decision about whether the activity should be in the stack -- android:noHistory is good when the activity is *never* in the stack -- finish() is good when the activity is conditionally removed from the stack (and, it's a bit better-known) I keep forgetting about android:noHistory, and that might be a good choice in this case: http://developer.android.com/guide/topics/manifest/activity-element.html#nohist -- 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 Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] 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

