修复密码登录界面按物理返回按钮时会回到桌面的问题

This commit is contained in:
zlzw 2023-03-04 13:56:50 +08:00
parent a1762bc791
commit a89c441555
2 changed files with 16 additions and 1 deletions

View File

@ -75,6 +75,15 @@ public class RouteUtil {
.withBoolean("forwardEntry", true) .withBoolean("forwardEntry", true)
.navigation(); .navigation();
} }
/**
* 只回到登录页不提示东西
*/
public static void forwardEntry2() {
ARouter.getInstance().build(PATH_ENTRY)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.navigation();
}
/** /**
* 跳转到个人主页 * 跳转到个人主页

View File

@ -122,7 +122,7 @@ public class LoginActivity extends AbsActivity {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
//finish(); //finish();
RouteUtil.forwardLauncher(LoginActivity.this); RouteUtil.forwardEntry2();
} }
}); });
@ -380,4 +380,10 @@ public class LoginActivity extends AbsActivity {
super.onDestroy(); super.onDestroy();
} }
@Override
public void onBackPressed() {
super.onBackPressed();
RouteUtil.forwardEntry2();
}
} }