0
I cannot pass the vector inside the Putextra. Someone can help me?
Activity 1
double[] valores = new double[vetorEdits.length];
for (int i = 0; i < vetorEdits.length ; i++) {
valores[i] = Double.parseDouble( vetorEdits[i].getText().toString());
}
Intent intent = new Intent(getApplication(),Main5Activity.class);
intent.putExtra("valores", valores[vetorEdits.length]);
startActivity(intent);
Activity 2
Intent intent = getIntent();
double[] valores = getIntent().getDoubleExtra("valores", 0,0);
Thanks! In case, how do I use a Toast to print the past values? Gave error, the conventional way. Toast.makeText(getApplicationContext(),values,Toast.LENGTH_LONG). show();
– Wesley
What Toast presents is a String. You have to "transform" the array into one. But that’s another question. However, see here how to proceed when a reply has been useful to you.
– ramaral