0
我正在开发一个启动器应用程序。当我在发射台上,并且我按下回家时,活动就会消失,并开启活动的新实例。按下回家后,我可以做些什么来保持主屏幕上的活动?为什么我的Android启动器在Home Press上重新打开
<application
android:name=".BaseApplication"
android:allowBackup="true"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="sensorPortrait"
android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
...