How do i get text from one activity and put it on a button in another activity.
<p>I want to know how I can get the text from an edittext in Activity B and put that text on the button of Activity A. I want to make it so that when i press the "enter" button on activity b it will get the text of the edittext and replace the text of a button in activity A. I think its something like this </p>

<pre><code>    public void pressEnter (View v){
    EditText et = (EditText) findViewById(R.id.editText1);
    String t = et.getText().toString();
    Button p1_button = (Button)findViewById(R.id.button1);
    p1_button.setText(t);
}
</code></pre>

<p>but i dont know how to get the ID of the button from activity A that I want to set the text to.</p>
