//Login button public void openMainActivity() { Intent intent = new Intent(this, MainActivity.class); intent.putExtra("username", txt_username.getText().toString()); startActivity(intent); txt_password.setText(null); txt_username.setText(null); }
// Hello user textview txt_welcomeUser = (TextView) findViewById(R.id.txt_welcomeuser); Bundle extras = getIntent().getExtras(); String username = null; if(extras != null){ username = extras.getString("username"); txt_welcomeUser.setText("WELCOME: " + username); }
txt_username
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)