Don't worry, you have correctly understood how to use Intent extras.
The problem is, you are trying to find an EditText
(with id R.id.tv) that is in your second Activity
's layout in your first Activity
's layout, and that leads to a NullPointerException
in your OnClickListener
.
Change this line of your first Activity
:
final EditText et = (EditText)findViewById(R.id.tv);
to:
final EditText et = (EditText)findViewById(R.id.et);