<string name="tx_1">Hello</string>
<string name="tx_2">Android</string>
@Override
public void onClick(View view) {
Intent intent = new Intent(this, SecondActivity.class);
switch(view.getId()){
case(R.id.btn1):
intent.putExtra(EXTRA_MESSAGE, getResources().getString(R.string.tx_1));
startActivity(intent);
break;
case(R.id.btn2):
intent.putExtra(EXTRA_MESSAGE, getResources().getString(R.string.tx_2));
startActivity(intent);
break;
}
}