I am creating a project in which i need to take in some numbers, makes some calculations and then on a new screen create show the answers. I am using an Intent
object to go to the new screen:
final Button button = (Button) findViewById(R.id.save);
button.setOnClickListener(new OnClickListener()
{
public void onClick(View v)
{
Intent myIntent = new Intent();
myIntent.setClass(HelloAndroid.this, screen2.class);
myIntent.putExtra("eFiber", Double.toString(E_fiber));
startActivity(myIntent);
}
});
but when i do this it crashes when i click the button. If i use the same xml file as i do in the first screen then it works just fine, its when i use a different xml file that i have the problems.