我想知道为什么带有 2.1-update1 的 Motorola Milestone 的行为与 Emulator 或例如 Nexus One 不同。我正在尝试退出我的应用程序:
@Override
protected void onPause() {
if(mayDestroyActivity) this.finish();
super.onPause();
}
这适用于模拟器或 Nexus One。在andonDestroy()
之后立即被调用。但不适用于里程碑。相反,当另一个 Activity 启动时被调用。它在 Manifest 中的部分如下所示:onPause()
onStop
onDestroy()
<activity android:name=".MyActivity"
android:configChanges="orientation|keyboardHidden"
android:label="@string/questionnaire_item"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<category android:name="android.intent.category.OPENABLE" />
</intent-filter>
</activity>
有人对此有提示吗?我的应用程序依赖于正确退出,因为我保存了所有进度onDestroy()
谢谢,
斯特夫