1
I have two editText
that I enter with an in and a calculate button. I would like to present the result in a second activity as soon as I press the calculate button. Could someone help me with this?
1
I have two editText
that I enter with an in and a calculate button. I would like to present the result in a second activity as soon as I press the calculate button. Could someone help me with this?
2
The basic model for passing information between Acitivities is this, according to android documentation:
Intent intent = new Intent(this, OutraActivity.class);
EditText editText = (EditText) findViewById(R.id.meuEditText);
String message = editText.getText().toString();
intent.putExtra("mensagem", message);
startActivity(intent);
And to take the OutraActivity.class
:
Intent intent = getIntent();
String message = intent.getStringExtra("mensagem");
There are more examples in the documentation, take advantage and give a check, is in English but is very dithic.
References for study:
http://www.ideiasprogramadas.com.br/android-passando-dados-telas/
http://developer.android.com/intl/pt-br/training/basics/firstapp/starting-activity.html
How do I pass parameters from the last Fragment to the previous Fragment?
Browser other questions tagged java android
You are not signed in. Login or sign up in order to post.
You need to provide more details on your question. What have you done? What code do you already have? What is the most difficult point to understand?
– Julio Henrique Bitencourt