Haven't we been over this before?
http://groups.google.com/group/android-developers/browse_thread/thread/bd020f8b809a6e56/e8b9520e43410abd


On Apr 14, 2:53 am, Neo <[email protected]> wrote:
> My app has 4 activities on the stack A->B->C->D (top)
>
> If you press home and re-enter the application, another instance of A
> is started, so the stack is A->B->C->D->A (top). I know this because
> when I press BACK, A is popped off and I now see D (instead of going
> to the Home screen).
>
> What I want is that when the user re-enters the app, they re-enter on
> the same activity they were in before (D).
>
> function
>         Intent intent;
>         intent = new Intent();
>         intent.setClass(this, LoginActivity.class);
>         startActivity(intent);
>         finish();
>
> i tested add the android:launchMode="singleTask" no changed
>
> <?xml version="1.0" encoding="utf-8"?>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android";
> package="com.pica.msn"
> android:versionCode="1"
> android:versionName="1.0.0">
> <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
> <uses-permission android:name="android.permission.INTERNET"/>
> <application android:icon="@drawable/icon"
> android:label="@string/app_name">
> <activity android:name=".SplashActivity"
> android:launchMode="singleTask"
> android:label="@string/app_name">
> <intent-filter>
> <action android:name="android.intent.action.MAIN" />
> <category android:name="android.intent.category.LAUNCHER" />
> </intent-filter>
> </activity>
> <activity android:name=".LoginActivity"
> android:launchMode="singleTask"
> android:label="@string/app_name">
> </activity>
> <activity android:name=".MainActivity"
> android:launchMode="singleTask"
> android:label="@string/app_name"
> android:theme="@android:style/Theme.Light">
> </activity>
>
> </application>
> </manifest>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to