2012-06-02 32 views

回答

4

您可以为清单中的启动画面设置android:noHistory =“true”。这不会将活动添加到后退堆栈。

<activity 
    android:name="SplashScreen" 
    android:noHistory="true" 
    <intent-filter> 
     <action android:name="android.intent.action.MAIN" /> 

     <category android:name="android.intent.category.LAUNCHER" /> 
    </intent-filter> 
</activity> 
2

在您的启动画面中调用完成( )当您启动活动B.

+0

有什么办法吗? 有时我在回按时有回家的活动。 请参阅http://stackoverflow.com/questions/10790222/android-history-stack-clear-without-one – user999822

+0

只需在启动您的B活动后,在您的启动画面活动中调用finish()即可。启动画面活动将被终止。 – buzeeg

相关问题