上后退按钮preSS的Andr​​oid跳过活动跳过、按钮、Andr、preSS

2023-09-12 22:14:42 作者:花花世界、有你珍贵

我有一个登录屏幕,其中在后,用户将被带到一个主屏幕的用户登录。

I have a login screen in which the user logs in. After that the user will be taken to a main screen.

现在我的问题是,当后退按钮是pressed用户带到登录界面了。

Now my problem is when the back button is pressed the user is taken to the login screen again.

有什么办法来解决这个问题呢?

Is there any way to fix this problem?

我已经打过电话完成()之后 startActivity(),但只取得了应用程序崩溃和没T似乎一个很好的解决办法。

I have tried calling finish() right after startActivity() but it only made the application crash and didn't seem a good solution either.

推荐答案

在清单中,添加安卓noHistory =真正的作为登录活动的属性。

In the manifest, add android:noHistory="true" as an attribute of the login activity.

 
精彩推荐
图片推荐