Skip to content Skip to sidebar Skip to footer

Bundle Array Of Arrays Is Not Working - Android

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

Solution 1:

You should try to create a Serializable class that has only one property, which should be your array of Inversor arrays and put that object in your intent. something like

publicclassInversorArraysimplementsSerializable {
    publicfinalstaticintserialVersionUID=//let eclipse generate your uidpublic Inversor[][] myArray = null;
    publicInversorArrays(Inversor[][] _myArray){
        this.myArray = _myArray;
    }
}

and then, in your activity, create an instance of InversorArrays an pass it to the intent

Of course, Inversor and its properties should be serializable too.

This workaround sometimes saved me a lot of time and problems with typecasting and conversion problems

Solution 2:

I am not sure, but have you made the investor class serializable? I think if we could get a basic view of the investor class, that may lead to some light.

I would say start off by making Investor serializable. http://www.tutorialspoint.com/java/java_serialization.htm

Post a Comment for "Bundle Array Of Arrays Is Not Working - Android"