Android Studio中如何实现App重启后跳转至最近访问的Activity
书籍类安卓应用记忆上次退出页面的Manifest参考配置
使用Android Studio开发安卓应用时,若开发的是书籍类应用,往往需要实现应用重新打开后自动跳转至用户上次退出时停留页面的功能,对应的AndroidManifest.xml参考配置如下:
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.Demo4"> <activity android:name=".MainActivity2"></activity> <activity android:name=".MainActivity" android:launchMode="singleTask"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application>
内容的提问来源于stack exchange,提问作者Krishna Game Studio
相关产品推荐
相关产品推荐

