I haven't played with this, but if you make your class (myArrayType) implement
the Serializable interface it should work fine. Of course, all the instance
variables of that class must also be Serializable, otherwise you would still
get an exception (probably a NotSerializableException).

Hope it helps,
Yuvi

On Sat, Sep 18, 2010 at 12:46 PM, jlopeznava...@gmail.com <
jlopeznava...@gmail.com> wrote:

> I have 2 dimensions array like this:
> public myArrayType[][] mObjArray;
>
> I want to save it in the onSaveInstanceState method, since my array
> contains lot of elements I dont want to save element by element but
> the whole array object, what is the best way?
>
> I tried this but exception is thrown:
>
> ---------------------------------------------------------
>
>  public Bundle saveState(Bundle map) {
>
>        if (map != null) {
>                map.putSerializable("objLevel", (Serializable)
> mCurrentLevelMatrix);
>        }
>
>        return map;
>    }
>
> -------------------------------------------------------
>
> I have seen a putParcelableArrayList method but dunno how it works
> exactly.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
YuviDroid
Check out Launch-X <http://android.yuvalsharon.net/launchx.php> (a widget to
quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to