Its very simple just define this under you onclick functionality where you intent to next activity
Define Onclick like this under OnCREATE
YourTEXT.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
next();
}
});
Then write this function anywhere in your activity
public void next()
{
String strMessage = YourTEXT.getText().toString());
// so on you can directly set values
// you have to just set values in string
Intent i = new Intent(getApplicationContext(), nextactivity.class)
i.putExtra("new_variable_name",strMessage);
startActivity(i);
}
Then in your next activity retrieve it via
Bundle extras = getIntent().getExtras();
String var="";
if (extras != null)
{
String value= extras.getString("new_variable_name");
value= var;
}
Then you can use the string var in your next activity