Im tryin to bundle an Array of Arrays but is not working. Heres a snipped of code for better understanding:
Declaring and Initializing the variable
Inversor[][] reg_equipment= new Inversor[7][5];
for(int i=0; i<7; i++)
{
for(int j=0;j<5;j++)
{
reg_equipment[i][j]= new Inversor();
}
}
//....
Putting the variable in the bundle
bundle.putSerializable("reg_equipment", reg_equipment);
Intent myIntent =new Intent(RegisterEquipmentInversor.this,RegisterEquipmentMain.class);
myIntent.putExtras(bundle);
startActivity(myIntent);
At this point, the reg_equipment is filled with Inversors [Inversor[0],Inversor[1]....,Inversor[6]] and inside those There are more Inversors.
But when I go "get" the bundle in the other class
reg_equipment = (Inversor[][]) extras.getSerializable("reg_equipment");
This is whats inside de reg_equipment - [Object[0],Object[1],...,[Object[6]] and inside those Objects there are Inversors. Why does this happens ? How can I fix it ?
The class Inversor implements Serializable
Thanks