passing data from textview of activity 1 through textview of activity2
<p>How to pass value of textview form one activity going to the other activity?</p>

<p>I have a scoring on my game that is shown on a textview and after it increment it will intent to the next activity. but the value of score from the first activity doesn't show on the textview of the second activity.</p>

<p>this is my code for my first activity</p>

<pre><code>final TextView score2 = (TextView) findViewById(R.id.tvscore2);
    Button page1 = (Button) findViewById(R.id.btnDog);
    page1.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            EditText etDog1 = (EditText) findViewById(R.id.etDog);
            String Dog = etDog1.getText().toString();

            if (Dog.equalsIgnoreCase("dog")) {
                global.score += 10;


                score2.setText(String.valueOf(global.score));
                Toast.makeText(getApplicationContext(), "Correct",
                        Toast.LENGTH_SHORT).show();
                Intent myIntent = new Intent(view.getContext(),
                        sound1_3pig.class);

                startActivityForResult(myIntent, 0);

            } else if (global.score &lt;= 0) {
                global.score += 0;
                score2.setText(String.valueOf(global.score));
                Toast.makeText(getApplicationContext(), "Wrong",
                        Toast.LENGTH_SHORT).show();
            } else {

                global.score -= 5;
                score2.setText(String.valueOf(global.score));
                Toast.makeText(getApplicationContext(), "Wrong",
                        Toast.LENGTH_SHORT).show();
            }
        }

    });

}
</code></pre>

<p>I want to display the result of the score activity 1 to the textview of the second activity</p>

<p>this is my second activity</p>

<pre><code>final TextView score1 = (TextView) findViewById(R.id.tvscore1);
    Button page1 = (Button) findViewById(R.id.btnCat);
    page1.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            EditText etCat = (EditText) findViewById(R.id.etCat);
            String Cat = etCat.getText().toString();
            if (Cat.equalsIgnoreCase("cat")) {

                global.score += 10;
                score2.setText(String.valueOf(global.score));

                Toast.makeText(getApplicationContext(), "Correct",
                        Toast.LENGTH_SHORT).show();

                Intent myIntent = new Intent(view.getContext(),
                        sound1_3pig.class);
                startActivityForResult(myIntent, 0);
                finish();

            } else if (global.score &lt;= 0) {
                global.score += 0;
                score2.setText(String.valueOf(global.score));
                Toast.makeText(getApplicationContext(), "Wrong",
                        Toast.LENGTH_SHORT).show();

            } else {
                global.score -= 5;
                score2.setText(String.valueOf(global.score));
                Toast.makeText(getApplicationContext(), "Wrong",
                        Toast.LENGTH_SHORT).show();
            }

        }
    });

}
</code></pre>
