I have a code that transforms getText
into string
and would like to pass this string
to another activity in a simple way, but not an activity coming soon after that.
My code:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
editTextEmail = (EditText) findViewById(R.id.email);
editTextPassword = (EditText) findViewById(R.id.password);
buttonSignIn = (Button) findViewById(R.id.email_sign_in_button);
cadastro_button = (Button) findViewById(R.id.cadastro_button);
progressDialog = new ProgressDialog(this);
buttonSignIn.setOnClickListener(this);
cadastro_button.setOnClickListener(this);
buttonSignIn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String email = editTextEmail.getText().toString();
String password = editTextPassword.getText().toString();
attemptLogin(email, password);
}
});
}