I'm creating an android application with 2 layouts. In one layout the user input data and I would like to keep this data and use it on a different layout.
I try using 2d array, but it seems that array values are not sent to the second layout.
On my first layout
grid = new double[2][long];
for( int i=0; i<long; i++ )
{
grid[0][i]=Data[i];
grid[1][i]=Value2;
}
public double[][] sendGrid()
{
return grid;
}
When I want to call the 2d grid array on the second Layout I have...
try{
Layout1 mapInstance = new Layout1y();
double[][] dataX = mapInstance.sendGrid();
Log.i("dataXLength",""+dataX.length);
}
catch(Exception e)
{
Log.i("-OK",e.toString());
}
The result is: 04-13 10:31:45.357: I/-OK(28588): java.lang.NullPointerException
Any idea on how can I send the 2d array to my second layout?
Thank you