问题描述:

I have an application that works like the UBER, it happens that when you're going on a run, the screen where the passenger accompanies the driver moving up to him, when the user will open other applications and attempt to return to the app by clicking on the main icon of the application that is in the launcher, the application returns to the first screen and not to the screen that was previously being screen is lost ...

My manifest.

 <application

android:name=".Application"

android:allowBackup="true"

android:icon="@drawable/ic_launcher"

android:label="@string/app_name"

android:theme="@style/AppTheme"

android:screenOrientation="portrait"

>

<activity

android:name=".MainActivity"

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=".ui.RaceActivity" android:screenOrientation="portrait"></activity>

</application>

网友答案:

It is because you had used finish() in your java coding as i know if you use finish() for activity then it always finish your activity and when you will open app then it will start it from first screen .

相关阅读:
Top