I need to transfer the contents of an EditText to another activity on Button click.
This is my current code for start of new activity:
Button proceed;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.intro);
proceed = (Button) findViewById(R.id.bProceed);
proceed.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent myIntent = new Intent(Introscreen.this, BillardScoreboardActivity.class);
Introscreen.this.startActivity(myIntent);
myIntent.putExtra ??????
}
});
}
The contents are supposed to be integers in the next activity.
Hope someone can help me.
Final problem:
Intent i = getIntent() //Error message if ";" isn't put after getintent()
String var = i.getStringExtra("lol");
int convert = Integer.parseInt(var); //Error message if ";" is put after getIntent()
Reveiver Side Write
THis is Simple Method