我有一个问题,我想要显示新布局并隐藏旧布局
my layout个 我有这个登录页面,如图片所示,当你登录时,你将被重定向到新的布局,而旧的将隐藏
public void Login(View v){
EditText Name_input = findViewById(R.id.Name);
String Name = Name_input.getText().toString();
EditText Pass_input = findViewById(R.id.Pass);
String Pass = Pass_input.getText().toString();
if(Name.equals(Login_Name) && Pass.equals(Login_Pass)){
TextView textView = findViewById(R.id.text);
textView.setText("Login Succesful");
textView.setTextColor(Color.parseColor("#00FF00"));
//if succesful login create new layout and hide the login page
}
else{
TextView textView = findViewById(R.id.text);
textView.setText("Login Failed");
textView.setTextColor(Color.parseColor("#FF0000"));
}`