>From http://developer.android.com/guide/topics/fundamentals.html#acttask
"As noted above, there's never more than one instance of a "singleTask" or "singleInstance" activity, so that instance is expected to handle all new intents. A "singleInstance" activity is always at the top of the stack (since it is the only activity in the task), so it is always in position to handle the intent. However, a "singleTask" activity may or may not have other activities above it in the stack. If it does, it is not in position to handle the intent, and the intent is dropped. (Even though the intent is dropped, its arrival would have caused the task to come to the foreground, where it would remain.)" Cheers, Justin Android Team @ Google On Sep 24, 11:45 am, justinh <[email protected]> wrote: > When users press on your icon again to "come back" they are launching > your activity, not the settings activity. Where do you start the > settings activity in your code? If it's outside of the onCreate/ > onStart/onResume methods then the user will have to repeat that action > to get back there. > > On Sep 24, 2:58 am, play_net <[email protected]> wrote: > > > My manifest: > > <activity android:label="@string/app_name" > > android:name="MainUI" android:screenOrientation="landscape" > > android:configChanges="orientation|keyboardHidden" > > android:launchMode="singleTask"> > > <intent-filter> > > <action android:name="android.intent.action.MAIN" /> > > <category > > android:name="android.intent.category.LAUNCHER" /> > > </intent-filter> > > </activity> > > <activity android:label="@string/settings_label" > > android:name=".view.Settings" android:configChanges="orientation| > > keyboardHidden"> > > </activity> > > > I press program's icon to start my program,and then open the > > Settings activity through startActivityForResult(intent, SETTINGS). > > Now i press the home key and start my program through program's > > icon, at this time the Settings actitity will run OnDestroy() and be > > destroyed. I can't understand why Settings activity is be destroyed > > automatically? How can I make Settings activity still focus when users > > come back. > > > Thank all. > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

