After using the Android Home button application restart problem

Normally this would be after you click home button to pause the program running in the background, click the back button will exit the application, but encountered a problem today, click on the home button, re-open the application but return every application launch page, puzzling, after some google, finally found the reason:

<activity
            android:name=".AppStart"
            android:label="@string/app_name"
            android:launchMode="standard"
            android:theme="@style/Default"
            android:screenOrientation="portrait"
            >

For launchMode first start page of the application can only be used standar mode, and before using singleTask cause each time you open the application would restart the page

Reproduced in: https: //my.oschina.net/zhouz/blog/213149

Guess you like

Origin blog.csdn.net/weixin_33877885/article/details/91728661