确定
我有清单
<application
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".ui.authorization.AuthActivity"
android:noHistory="true">
</activity>
<activity android:name=".ui.callsigns.SelectCallsignActivity"
android:launchMode="singleTop">
</activity>
<activity android:name=".ui.order.waitorder.WaitOrderActivity"
android:launchMode="singleTop">
</activity>
<activity android:name=".ui.balance.BalanceActivity"
android:noHistory="true"
/>
<activity android:name=".ui.splash.SplashActivity"
android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ui.order.gotorder.GoogleMapsActivity"/>
<activity android:name=".ui.order.gotorder.OrderDetailsActivity"
android:launchMode="singleTask"/>
<service android:name=".location.ServiceForLocation"/>
<service android:name=".network.newsocket.NewSocketService"/>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key"/>
<meta-data
android:name="io.fabric.ApiKey"
android:value="db0dc6f3ae8099a148926812fca7bd6cc29b4f4b"/>
</application>
...
接下来启动WaitOrderActivity
Intent intent = new Intent(getBaseContext(), WaitOrderActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_TASK_ON_HOME);
startActivity(intent);
接下来是回调但在WaitOrderActivity中我启动了OrderDetailsActivity
毕竟我再次调用startActivity(WaitOrderActivity)或OrderDetailsActivity.this.finish,无论如何我将再次使用WaitOrderActivity。 麻烦:第二次我看日志OrderDetailsActivity开始了什么,但我没有在屏幕上看到它。我仍然看到WaitOrderActivity。为什么呢?